[Bug 2089] New: errno not threadsafe

bugzilla at busybox.net bugzilla at busybox.net
Mon Jun 21 08:46:56 UTC 2010


           Summary: errno not threadsafe
           Product: uClibc
           Version: 0.9.31
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P5
         Component: Threads
        AssignedTo: unassigned at uclibc.org
        ReportedBy: jacmet at uclibc.org
                CC: uclibc-cvs at uclibc.org
   Estimated Hours: 0.0

Created attachment 2071
  --> https://bugs.busybox.net/attachment.cgi?id=2071
test program triggering the bug

errno access doesn't seem to be threadsafe using linuxthreads /
linuxthreads.old. There has been several reports of it on the list, E.G.:


It's easy to reproduce, simply compile and run the attached test program. I'm
expecting to see no output (which is what I get if I run it under glibc), but
get lots of errno=0 lines instead of the expected EBADF / ENOSPC. If I apply
the patch in the mail above, I no longer see any errno=0 lines, but the threads
sometimes gets mixed up (E.G. errno=EBADF instead of ENOSPC and the reverse).

Tested on ARM9 (EABI) and x86-64 using linuxthreads and linuxthreads.old with
the default buildroot config

I also see this on, so it isn't a new issue.

Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the uClibc-cvs mailing list