[PATCH] ld.so_nptl: bug discovered while running firefox 3

Carmelo AMOROSO carmelo.amoroso at st.com
Fri Nov 14 09:02:50 UTC 2008


Hi Khem, All
while doing some test with firefox 3 (linked against uclibc-nptl on 
sh4), we discovered a bug in ld.so dynamic linker.
In firefox there is a shared object libejmalloc.so having a constructor 
that accesses a TLS variable using the local-dynamic tls access model.
During the ld.so startup the dtv entries are properly initialized just 
after calling the constructors for all NEEDED dso, so causing the 
segfault in __tls_get_address.
The patch basically move the dtv initialization before calling the 
constructor (we checked glibc too, and it correclty does in this way).

My colleague implemented a simple test case (added in the test suite ) 
that exploits this bug.

Khem, may you run the test case, before and after applying the patch so 
on arm-nptl too.
Waiting for your feedback before pushing it out in SVN.

Cheers,
Carmelo
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ldso_dtv_initialization.patch
Url: http://lists.busybox.net/pipermail/uclibc/attachments/20081114/18a066ad/attachment.diff 


More information about the uClibc mailing list