[jdk8u-dev] RFR: 8186787: clang-4.0 SIGSEGV in Unsafe_PutByte
Zdenek Zambersky
zzambers at openjdk.org
Thu Jul 25 15:06:46 UTC 2024
This backport fixes [failures](https://github.com/zzambers/jdk8u-dev/actions/runs/9858657012/job/27221579883) (segfaults) in following tests which appeared after [macos update](https://github.com/openjdk/jdk8u-dev/pull/544):
sun/misc/CopyMemory.java
compiler/unsafe/OpaqueAccesses.java
Backport differs from original changeset, because there were significant changes/refactoring in unsafe.
**Notes:**
- original changeset changes pointer returned by `addr` (`MemoryAccess` class), to volatile. Otherwise it is basically less refactoring.
- MemoryAccess is used by `Unsafe_{Set,Put}*` and `Unsafe_{Set,Put}*Volatile` functions, defined using `DEFINE_GETSETOOP` and `DEFINE_GETSETOOP_VOLATILE` macros
- jdk8 does not have `MemoryAccess` class, so equivalent pointers, in functions mentioned higher, are cast to volatile, to achieve same effect
Testing:
Tier1: OK (fixes `sun/misc/CopyMemory.java` and `compiler/unsafe/OpaqueAccesses.java` functions on macos fixed, 1 failure on Linux x86 is timeout - seems unrelatd)
-------------
Commit messages:
- Unsafe fix
Changes: https://git.openjdk.org/jdk8u-dev/pull/553/files
Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=553&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8186787
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk8u-dev/pull/553.diff
Fetch: git fetch https://git.openjdk.org/jdk8u-dev.git pull/553/head:pull/553
PR: https://git.openjdk.org/jdk8u-dev/pull/553
More information about the jdk8u-dev
mailing list