From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,c6b158c26aecc01c X-Google-Attributes: gidfc89c,public X-Google-Thread: fee84,c6b158c26aecc01c X-Google-Attributes: gidfee84,public From: amartin@denton.zko.dec.com (Alan H. Martin) Subject: Re: dlopen/dlclose & C++ (DEC UNIX) Date: 1996/03/27 Message-ID: <4jbk1u$ko7@zk2nws.zko.dec.com>#1/1 X-Deja-AN: 144705662 references: <4j6q8e$ucf@xensei3.xensei.com> organization: DEC newsgroups: comp.unix.osf.osf1,comp.unix.programmer In article <4j6q8e$ucf@xensei3.xensei.com> ccrlphr@xensei.com writes: >I got a problem while using the dynamic loading with C++ (DEC CXX 5.0). >I wrote a app which defines an interface == class within a header file >and lets you dynamically load libraries with this interface within the >run of the prog, e.g.: Cool. >... My problem starts if I don't need the lib any longer and want to get the >memory back using . ... The file /usr/lib/cmplrs/cxx/DECCXX500.release-notes states on pp. 1-10 and 1-11: " 1.3.3 Current Restrictions This section contains usage notes and known problems with DEC C++ Version 5.0. ... o Static destructors in dynamically loaded DEC C++ shared libraries are not invoked if the DEC OSF/1 Alpha library routine dlclose(3) is used to dynamically unload the C++ shared libraries. Furthermore, the main program fails when exiting because it attempts to call the destructors in the unloaded shared libraries. " Sorry about that. >This generates the question if this is > a) a general problem between C++ and the dl-library > b) a problem between DEC CXX (V5.0) and the dl-library > c) a problem on DEC UNIX (osf/1 V.3.2C) > d) a problem of misusage > e) nothing of the above It's a day-one design flaw in the C++ runtime support code which executes static object destructors upon program exit (and dlclose). The problem is fixed in DEC C++/Alpha/Unix V5.3, scheduled to ship on CDrom on 12-Apr-96. >BTW, does anybody knows a workaround ?? (except "not calling ") Will disabling the dlclose calls for a few more weeks suffice? /AHM/THX -- Alan Howard Martin AMartin@TLE.ENet.DEC.Com