Details
-
Enhancement
-
Resolution: Fixed
-
P4
-
19
-
b19
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8318198 | 17.0.10-oracle | Calvin Cheung | P4 | Resolved | Fixed | b03 |
JDK-8312088 | 17.0.9 | Sergey Nazarkin | P4 | Resolved | Fixed | b01 |
Description
1) on Mac m1, it causes problems with execution prevention for generated code, requiring awkward - and partly nonfunctional - workarounds like this: https://github.com/openjdk/jdk/blob/4df67426ed02f18af0757897acb28b636a317a91/src/hotspot/share/runtime/safefetch.inline.hpp#L37-L41 . Partly nonfunctional since this requires Thread::current() to be present, which cannot be guaranteed for all call sites of SafeFetch().
2) Since SafeFetch relies on dynamic stub generation, there is a time window during VM initialization where SafeFetch is unreliable. As a result, hs-err reports for crashes in that time can get compromised. It also may affect early NMT reports, when call stacks are printed.
3) Dynamic generation uses a tiny bit of startup time.
SAP proposed a patch for (1) with
I have a prototype that works on Linux (x64, x86, aarch64, arm), MacOS (x64, aarch64), Windows, and Zero. It uses static assembly (MacOS and Linux) resp. SEH (Windows) resp. sigsetjmp/longjmp (zero).
[1] https://github.com/openjdk/jdk/pull/7727
[2] https://github.com/openjdk/jdk/pull/7727#issuecomment-1064936019
Attachments
Issue Links
- backported by
-
JDK-8312088 Implement SafeFetch statically
- Resolved
-
JDK-8318198 Implement SafeFetch statically
- Resolved
- duplicates
-
JDK-8307549 AsyncGetCallTrace crashes on Mac M1 after JDK-8294160
- Closed
-
JDK-8282475 SafeFetch should not rely on existence of Thread::current
- Resolved
- is blocked by
-
JDK-8307549 AsyncGetCallTrace crashes on Mac M1 after JDK-8294160
- Closed
- relates to
-
JDK-8284997 arm32 build crashes since JDK-8283326
- Resolved
-
JDK-8307549 AsyncGetCallTrace crashes on Mac M1 after JDK-8294160
- Closed
-
JDK-8292166 POSIX signal handling issues with pc access
- Closed
-
JDK-8331541 [i386] linking with libjvm.so fails after JDK-8283326
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/55365208
-
Commit openjdk/jdk/bdf8a2a2
-
Review openjdk/jdk17u-dev/1557
-
Review openjdk/jdk/7865