On 16 April 2014 11:57, Vineet Gupta <[email protected]> wrote: > WHY: errno in uClibc is not thread safe > > HOW: __errno_location and it's sibling __h_errno_location need to be called > via PLT - even from within libc. That way when linked with pthread, > intra-uClibc callers will also use the thread safe version. > > This is achieved by removing the GI alias for these functions, > ensuring that they get called normally (via PLT) > > Verified with ARC LT.old and ARM cubieboard2 buildroot (LT.old) > NPTL is unaffected by this bug. > > ------------ History behind this patch --------------------- > > This is a long standing bug (https://bugs.busybox.net/show_bug.cgi?id=2089) > > Others have tried to fix it in past (alteast Peter Korsgaard's patch in 2010), > but somehow failed to be merged (or were backed out afterwards). > http://lists.uclibc.org/pipermail/uclibc/2010-July/044176.html > > One of the causes could be side effect of atleast one more bug related to > pthreads and static link which has now been fixed. > http://lists.uclibc.org/pipermail/uclibc/2013-October/047958.html > > I have solved this w/o looking at other pacthes but would like to give > credit to Peter and others for confirming that it makes sense. > > Cc: Christian Ruppert <[email protected]> > CC: Francois Bedard <[email protected]> > Cc: Joern Rennecke <[email protected]> > Cc: Jeremy Bennett <[email protected]> > Cc: Thomas Petazzoni <[email protected]> > Cc: Peter Korsgaard <[email protected]> > Cc: Khem Raj <[email protected]> > Cc: [email protected] > Signed-off-by: Vineet Gupta <[email protected]> > --- > Changes since v2 > No code changes, added couple more lines to changelog > > Changes since v1 > (http://lists.uclibc.org/pipermail/uclibc/2014-March/048273.html > > - Rebased to trunk > - Added handling for h_errno_location > > Signed-off-by: Vineet Gupta <[email protected]>
Applied, thanks! _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
