Skip to content

Commit 1b8dea4

Browse files
committed
8332894: ubsan: vmError.cpp:2090:26: runtime error: division by zero
Reviewed-by: dholmes, stuefe
1 parent 0e7ea39 commit 1b8dea4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/hotspot/share/utilities/vmError.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2082,8 +2082,13 @@ bool VMError::check_timeout() {
20822082
#ifdef ASSERT
20832083
typedef void (*voidfun_t)();
20842084

2085-
// Crash with an authentic sigfpe
2085+
// Crash with an authentic sigfpe; behavior is subtly different from a real signal
2086+
// compared to one generated with raise (asynchronous vs synchronous). See JDK-8065895.
20862087
volatile int sigfpe_int = 0;
2088+
2089+
#if defined(__clang__) || defined(__GNUC__)
2090+
__attribute__((no_sanitize("undefined")))
2091+
#endif
20872092
static void ALWAYSINLINE crash_with_sigfpe() {
20882093

20892094
// generate a native synchronous SIGFPE where possible;

0 commit comments

Comments
 (0)