-
Bug
-
Resolution: Duplicate
-
P3
-
17.0.7, 17.0.7-oracle
Among other things, the change included the following addition in Method::is_valid_method:
} else if (!os::is_readable_range(m, m + 1)) {
return false;
os::is_readable_range() is implemented with SafeFetch32.
Before
AsyncGetCallTrace, widely used for profiling (by means of async-profiler), also calls Method::is_valid_method(). Since a thread calling AsyncGetCallTrace is not guaranteed to be in "executable" JIT state, it's illegal to call dynamically generated SafeFetch.
JDK 17.0.7 started crashing on Mac M1 during profiling:
# SIGBUS (0xa) at pc=0x000000013fd394e4, pid=80473, tid=120091
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
v ~StubRoutines::SafeFetch32
V [libjvm.dylib+0x7aea40] _ZN2os17is_readable_rangeEPKvS1_+0x2c
V [libjvm.dylib+0x75d0c8] _ZN6Method15is_valid_methodEPKS_+0x38
V [libjvm.dylib+0x34d1d0] _ZL31forte_fill_call_trace_given_topP10JavaThreadP15ASGCT_CallTracei5frame+0x460
V [libjvm.dylib+0x34cd48] AsyncGetCallTrace+0x1e0
Note: the bug applies only to 17.0.7. It's not an issue with JDK 20+ since SafeFetch was made static in
- blocks
-
JDK-8283326 Implement SafeFetch statically
- Resolved
- duplicates
-
JDK-8283326 Implement SafeFetch statically
- Resolved
- relates to
-
JDK-8304725 AsyncGetCallTrace can cause SIGBUS on M1
- Resolved
-
JDK-8321116 AsyncGetCallTrace crashes on macOS/AArch64 after JDK-8314600
- New
-
JDK-8294160 misc crash dump improvements
- Resolved
-
JDK-8283326 Implement SafeFetch statically
- Resolved
-
JDK-8330171 Lazy W^X switch implementation
- Closed
(2 relates to)