[llvm-bugs] [Bug 25598] New: system_category().message() and generic_category().message() are not thread safe

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Nov 21 21:17:41 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25598

            Bug ID: 25598
           Summary: system_category().message() and
                    generic_category().message() are not thread safe
           Product: libc++
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: erik65536 at gmail.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

The function __do_message::message() is inherited by __system_error_category
and __generic_error_category. This function converts an error code to a string
using strerror(). The strerror() function is not thread safe. See
include/system_error and src/system_error.cpp.

This bug could be fixed by replacing strerror() with the platform specific
thread safe version (usually strerror_r()).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151122/55ebdd88/attachment.html>


More information about the llvm-bugs mailing list