Skip to content
Permalink
Browse files
8266172: -Wstringop-overflow happens in vmError.cpp
Reviewed-by: dholmes, stuefe
  • Loading branch information
YaSuenag committed May 7, 2021
1 parent 43ad24f commit c97f56cdafe26dfafcfbc6bb42fa5617641c1a59
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/hotspot/share/utilities/vmError.cpp
@@ -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

0 comments on commit c97f56c

Please sign in to comment.