This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/19694] New: strerror should be thread-safe


https://sourceware.org/bugzilla/show_bug.cgi?id=19694

            Bug ID: 19694
           Summary: strerror should be thread-safe
           Product: glibc
           Version: 2.24
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

strerror should use a thread-local buffer, so that applications do not have to
use strerror_r.  This mirrors what other systems do.

Experience shows that strerror is often used in multi-threaded programs
(including in otherwise thread-safe libraries).  It is also difficult to get
the definition the application expects because the prototypes for strerror_r
differ in the GNU and POSIX ABI.

Right now, the simplest way out of this mess is to use snprintf and %m, but
this conversion specifier is not portable.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]