Bug 6158

Summary: Crash during library unloading with RTLD_GLOBAL
Product: uClibc Reporter: Adam Mitz <mitza>
Component: Shared Library SupportAssignee: unassigned
Status: NEW ---    
Severity: normal CC: buildroot, uclibc-cvs
Priority: P5    
Version: 0.9.33.2   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: patch to libdl.c, update _dl_loaded_modules->symbol_scope->r_list during unloading

Description Adam Mitz 2013-04-03 16:24:24 UTC
Created attachment 4832 [details]
patch to libdl.c, update _dl_loaded_modules->symbol_scope->r_list during unloading

After enabling RTLD_GLOBAL, we found a case where running destructors in dlclose caused a crash during what should have been a successful dynamic symbol lookup.  The attached patch fixes the crash.
Comment 1 filippo.arcidiacono 2013-07-04 08:55:55 UTC
(In reply to comment #0)
> Created attachment 4832 [details]
> patch to libdl.c, update _dl_loaded_modules->symbol_scope->r_list during
> unloading
> 
> After enabling RTLD_GLOBAL, we found a case where running destructors in
> dlclose caused a crash during what should have been a successful dynamic symbol
> lookup.  The attached patch fixes the crash.

Please, could you provide a minimal test case spot the issue you are raising?