Skip to content

Commit b68a942

Browse files
author
Paul Hohensee
committed
8266172: -Wstringop-overflow happens in vmError.cpp
Reviewed-by: mdoerr Backport-of: c97f56c
1 parent 99870b4 commit b68a942

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hotspot/share/utilities/vmError.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,8 +1754,8 @@ static void crash_with_sigfpe() {
17541754
// crash with sigsegv at non-null address.
17551755
static void crash_with_segfault() {
17561756

1757-
char* const crash_addr = (char*) VMError::get_segfault_address();
1758-
*crash_addr = 'X';
1757+
int* crash_addr = reinterpret_cast<int*>(VMError::get_segfault_address());
1758+
*crash_addr = 1;
17591759

17601760
} // end: crash_with_segfault
17611761

0 commit comments

Comments
 (0)