Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
8266172: -Wstringop-overflow happens in vmError.cpp
Browse files Browse the repository at this point in the history
Reviewed-by: yan
Backport-of: c97f56c
  • Loading branch information
wkia authored and Yuri Nesterenko committed Sep 16, 2022
1 parent a682e10 commit 7e5b8d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/utilities/vmError.cpp
Expand Up @@ -1756,8 +1756,8 @@ static void crash_with_sigfpe() {
// crash with sigsegv at non-null address.
static void crash_with_segfault() {

char* const crash_addr = (char*) VMError::get_segfault_address();
*crash_addr = 'X';
int* crash_addr = reinterpret_cast<int*>(VMError::get_segfault_address());
*crash_addr = 1;

} // end: crash_with_segfault

Expand Down

1 comment on commit 7e5b8d3

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.