RFR: 8346193: Test runtime/ErrorHandling/TestDwarf.java fails build with clang17 [v2]
SendaoYan
syan at openjdk.org
Wed Dec 18 08:30:36 UTC 2024
On Tue, 17 Dec 2024 07:06:37 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> update comment "Use volatile to prevent compiler from optimising away the store"
>
> src/hotspot/share/runtime/frame.cpp line 1166:
>
>> 1164: // simulate GC crash here to dump java thread in error report
>> 1165: if (CrashGCForDumpingJavaThread) {
>> 1166: volatile char *t = nullptr; // Use volatile modifier to make clang avoid 'dead code' elimination
>
> Suggestion:
>
> volatile char* t = nullptr; // Use volatile to prevent compiler from optimising away the store
Thanks David. The comment had been updated.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22757#discussion_r1889814710
More information about the hotspot-dev
mailing list