RFR: 8346193: Test runtime/ErrorHandling/TestDwarf.java fails build with clang17 [v2]

SendaoYan syan at openjdk.org
Wed Dec 18 09:01:37 UTC 2024


On Tue, 17 Dec 2024 11:00:56 GMT, Hamlin Li <mli at openjdk.org> wrote:

> Would `ShouldNotReachHere();` be more secure?

There is a bit diffrence between `ShouldNotReachHere();` and `*t = 'c';`

1. `ShouldNotReachHere();` cause jvm trigger `Internal Error` and then crash.
2. `*t = 'c';` cause jvm receive `SIGSEGV` signal, and then  crash.

The test `runtime/ErrorHandling/TestDwarf.java` try to test various kinds jvm errors, such as `unsafeAccess`/`outOfMemory`/`abortVMOnException`/`nativeDivByZero` etc. I don't known change `*t = 'c';` to `ShouldNotReachHere();` could change the test intention or not. So I'm inclined to keep this unchange, just add `volatile` modifier.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/22757#issuecomment-2550739950


More information about the hotspot-dev mailing list