This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dlclose not calling destructors of static variables.


On 01/02/2010 22:44, Dave Korn wrote:
On 01/02/2010 17:35, Andrew West wrote:

But the atexit function is registered at 0x706c10f0. Changing
AllocationBase to BaseAddress worked for my test case out of pure luck,
with my larger libraries it still failed.
I've managed to convince myself it's right actually.

Looking at one of the libraries in my code that fails I get ( with the
atexit at 0x78351c9 )

remove_dll_atexit;
m.AllocationBase = 0x7820000
m.AllocationBase + m.RegionSize = 0x7824000

GDB;
from = 0x07821000
to = 0x079159b8
   Please post the output of "objdump -h" on this library.  (If there's no
problem doing so, please send me a copy of the binary off-list.)

     cheers,
       DaveK


-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple

I've attached the objdump -h output. Looks like the library was relocated in memory, but if I do;

0x63940000 + ( 0x78351c9 - 0x7820000 ) = 0x639551c9

Checking the assembly dump from objdump and the destructor is there at
0x6394632b, it's just a simple call to the base classes destructor. The only thing that might be of interest is that the base classes
destructor is in another shared library. Then again cygwin isn't even managing to call the original destructor so I can't see how that
might effect things.


Andy

Attachment: objdump.txt
Description: Text document

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]