Changes between Initial Version and Version 5 of Ticket #103
- Timestamp:
- Aug 27, 2006, 2:20:23 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #103
-
Property
Severity
changed from
critical
tonormal
-
Property
Summary
changed from
Exit list handlers registered from dll are not released on DosFreeModule
tolibc: atexit() callbacks in dlls are called after dlclose()/DosFreeModule() on the DLL
-
Property
Version
changed from
0.6.1
to0.6
- Property Keywords dlclose DosFreeModule atexit on_exit added
-
Property
Severity
changed from
-
Ticket #103 – Description
initial v5 1 Scenario: a DLL register an exit list function using atexit() and the dll is loaded using DosLoadModule; when the executable calls DosFreeModule, the exit list handler is not executed nor removed from the list of callbacks. 2 When the executable terminates, it tries to call the dll exit callback and a crash occurs since the dll code is already unloaded from memory. 3 4 This doesn't happen when the dll is linked at compile time. 5 6 Testcase attached. 1 Use {{{atexit()/on_exit()}}} to register a callback residing in a dynamically loaded DLL. Then unload the DLL. When {{{exit()}}} eventually is called, the application crashes because the callback code isn't there anylonger.