8148425: strerror() function is not thread-safe

Reviewed-by: dholmes, coleenp
This commit is contained in:
Thomas Stuefe 2016-03-12 08:35:05 +01:00
parent 69e1552338
commit 3487b38cc4
22 changed files with 300 additions and 137 deletions

View file

@ -363,7 +363,7 @@ bool FileMapInfo::open_for_read() {
fail_continue("Specified shared archive not found.");
} else {
fail_continue("Failed to open shared archive file (%s).",
strerror(errno));
os::strerror(errno));
}
return false;
}
@ -393,7 +393,7 @@ void FileMapInfo::open_for_write() {
int fd = open(_full_path, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0444);
if (fd < 0) {
fail_stop("Unable to create shared archive file %s: (%s).", _full_path,
strerror(errno));
os::strerror(errno));
}
_fd = fd;
_file_offset = 0;