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

Commit 7e5b8d3

Browse files
wkiaYuri Nesterenko
authored andcommitted
8266172: -Wstringop-overflow happens in vmError.cpp
Reviewed-by: yan Backport-of: c97f56c
1 parent a682e10 commit 7e5b8d3

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
@@ -1756,8 +1756,8 @@ static void crash_with_sigfpe() {
17561756
// crash with sigsegv at non-null address.
17571757
static void crash_with_segfault() {
17581758

1759-
char* const crash_addr = (char*) VMError::get_segfault_address();
1760-
*crash_addr = 'X';
1759+
int* crash_addr = reinterpret_cast<int*>(VMError::get_segfault_address());
1760+
*crash_addr = 1;
17611761

17621762
} // end: crash_with_segfault
17631763

0 commit comments

Comments
 (0)