Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8348323: Corrupted timezone string in JVM crash log #1382

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/hotspot/share/runtime/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1141,8 +1141,7 @@ void os::print_date_and_time(outputStream *st, char* buf, size_t buflen) {
if (localtime_pd(&tloc, &tz) != nullptr) {
wchar_t w_buf[80];
size_t n = ::wcsftime(w_buf, 80, L"%Z", &tz);
if (n > 0) {
::wcstombs(buf, w_buf, buflen);
if (n > 0 && ::wcstombs(buf, w_buf, buflen) != (size_t)-1) {
st->print("Time: %s %s", timestring, buf);
} else {
st->print("Time: %s", timestring);
Expand Down