mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 03:32:35 +08:00

Summary: system_error::message() uses `strerror` for the generic and system categories. This function is not thread safe. The fix is to use `strerror_r`. It has been available since 2001 for GNU libc and since BSD 4.4 on FreeBSD/OS X. On platforms with GNU libc the extended version is used which always returns a valid string, even if an error occurs. In single-threaded builds `strerror` is still used. See https://llvm.org/bugs/show_bug.cgi?id=25598 Reviewers: majnemer, mclow.lists Subscribers: erik65536, cfe-commits, emaste Differential Revision: http://reviews.llvm.org/D20903 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272633 91177308-0d34-0410-b5e6-96231b3b80d8