BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000918 [uClibc] Shared Library Support major always 06-21-06 01:03 06-21-06 01:36
Reporter albrecht View Status public  
Assigned To uClibc
Priority normal Resolution no change required  
Status closed   Product Version 0.9.26
Summary 0000918: dlclose() doesn't call shared object destructor
Description Using the dynamic loader, the constructor and destructor functions should be run when dlopen() or dlclose() are called, respectively. This works properly on any glibc based system, but with uclibc 0.9.26 on an ARM9 board, dlclose() doesn't call the destructor.

This is bad as the destructor is responsible to free any dynamically allocated stuff of "plugins" which should be loaded and unloaded dynamically.
Additional Information The attached test case produces the following output on a glibc system (just say make and run dl-test):

<snip>
plugin constructor func
Hello from plugin [42]!
Result = 43
plugin destructor func <<< called through dlclose()
dlclose() done.
</snip>

Using uclibc, the destructor is called only when the application exits, and /not/ by dlclose().
Attached Files  dl-test.tar.gz [^] (1,538 bytes) 06-21-06 01:03

- Relationships

- Notes
(0001440)
vapier
06-21-06 01:36

you really need to upgrade, 0.9.26 is pretty outdated and as you've illustrated here, has bugs that have already been fixed

also, your makefile is broken ... it fails to build the shared object code with -fPIC
 

- Issue History
Date Modified Username Field Change
06-21-06 01:03 albrecht New Issue
06-21-06 01:03 albrecht Status new => assigned
06-21-06 01:03 albrecht Assigned To  => uClibc
06-21-06 01:03 albrecht File Added: dl-test.tar.gz
06-21-06 01:04 albrecht Issue Monitored: albrecht
06-21-06 01:36 vapier Note Added: 0001440
06-21-06 01:36 vapier Status assigned => closed
06-21-06 01:36 vapier Resolution open => no change required


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker