[jdk8u-dev] RFR: 8186787: clang-4.0 SIGSEGV in Unsafe_PutByte

Zdenek Zambersky zzambers at openjdk.org
Wed Feb 26 13:16:02 UTC 2025


On Wed, 26 Feb 2025 10:01:10 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

>> @adinn @tstuefe @theRealAph Could you please help review this? We see crashes of this in GHA, so it looks to fix a real bug. Then again it's fairly late to touch this area in JDK 8u. Thoughts?
>
> @jerboaa I think this is fine to backport. Adding a volatile qualifier to the access cannot really do any harm as it has the very limited effect of stopping the C++ compiler from reordering the volatile field access write relative to other volatile field accesses within the current thread's instruction stream. Since that is actually what is required here I cannot see any real risk. My real concern is that the introduction of volatile is clearly flagged in comments and happens at a point where it is most obvious what is going on and why.

@adinn thank you for the review

I added comment, as you have suggested. (As in the end, approach with DEFINE_GETSETOOP is not used, I kept it as it is.)
Should I mark you as co-author?
 
I rebased changes on current master, to avoid some unrelated, already fixed failures in GHA testing.

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

PR Comment: https://git.openjdk.org/jdk8u-dev/pull/553#issuecomment-2684918129


More information about the jdk8u-dev mailing list