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

Commit 21f57b4

Browse files
wkiaYuri Nesterenko
authored andcommitted
8266172: -Wstringop-overflow happens in vmError.cpp
Reviewed-by: yan Backport-of: c97f56cdafe26dfafcfbc6bb42fa5617641c1a59
1 parent 0938ea8 commit 21f57b4

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
@@ -1769,8 +1769,8 @@ static void crash_with_sigfpe() {
17691769
// crash with sigsegv at non-null address.
17701770
static void crash_with_segfault() {
17711771

1772-
char* const crash_addr = (char*) VMError::get_segfault_address();
1773-
*crash_addr = 'X';
1772+
int* crash_addr = reinterpret_cast<int*>(VMError::get_segfault_address());
1773+
*crash_addr = 1;
17741774

17751775
} // end: crash_with_segfault
17761776

0 commit comments

Comments
 (0)