mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-03 15:08:24 +00:00
8266172: -Wstringop-overflow happens in vmError.cpp
Reviewed-by: dholmes, stuefe
This commit is contained in:
parent
43ad24feb2
commit
c97f56cdaf
@ -1770,8 +1770,8 @@ static void crash_with_sigfpe() {
|
||||
// crash with sigsegv at non-null address.
|
||||
static void crash_with_segfault() {
|
||||
|
||||
char* const crash_addr = (char*)VMError::segfault_address;
|
||||
*crash_addr = 'X';
|
||||
int* crash_addr = reinterpret_cast<int*>(VMError::segfault_address);
|
||||
*crash_addr = 1;
|
||||
|
||||
} // end: crash_with_segfault
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user