mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +02:00
8148425: strerror() function is not thread-safe
Reviewed-by: dholmes, coleenp
This commit is contained in:
parent
69e1552338
commit
3487b38cc4
22 changed files with 300 additions and 137 deletions
|
@ -1144,7 +1144,8 @@ void os::WatcherThreadCrashProtection::check_crash_protection(int sig,
|
|||
#define check_with_errno(check_type, cond, msg) \
|
||||
do { \
|
||||
int err = errno; \
|
||||
check_type(cond, "%s; error='%s' (errno=%d)", msg, strerror(err), err); \
|
||||
check_type(cond, "%s; error='%s' (errno=%s)", msg, os::strerror(err), \
|
||||
os::errno_name(err)); \
|
||||
} while (false)
|
||||
|
||||
#define assert_with_errno(cond, msg) check_with_errno(assert, cond, msg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue