-
Bug
-
Resolution: Fixed
-
P2
-
17
-
b24
-
aarch64
-
os_x
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8267780 | 16u-cpu | Vladimir Kempik | P2 | Resolved | Fixed | master |
JDK-8267607 | 16.0.2 | Vladimir Kempik | P2 | Closed | Fixed | b06 |
JDK-8267526 | 15.0.4 | Vladimir Kempik | P2 | Resolved | Fixed | b03 |
JDK-8267537 | 13.0.8 | Vladimir Kempik | P2 | Resolved | Fixed | b03 |
JDK-8268614 | 11.0.13-oracle | Harold Seigel | P2 | Closed | Fixed | b01 |
JDK-8267622 | 11.0.12 | Vladimir Kempik | P2 | Resolved | Fixed | b04 |
JDK-8267790 | openjdk8u302 | Vladimir Kempik | P2 | Resolved | Fixed | b05 |
it was sitting there since jep-391 integration, but only got discovered in macos 11.4beta
so, InterpreterRuntime::throw_pending_exception ends this way
libjvm.dylib`InterpreterRuntime::throw_pending_exception:
-> 0x105c67ecc <+268>: b 0x105fc099c ; os::current_thread_enable_wx(WXMode)
it's destructor of ThreadWXEnable __wx(WXWrite, current) from JRT_ENTRY block
os::current_thread_enable_wx ends up calling pthread_jit_write_protect_np in same manner, but since 11.4b, pthread_jit_write_protect_np does pacibsp as it's very first instruction, making LR register poisoned with PAC signature:
libsystem_pthread.dylib`pthread_jit_write_protect_np:
-> 0x1888c84ec <+0>: pacibsp
0x1888c84f0 <+4>: stp x29, x30, [sp, #-0x10]!
Lr before pacibsp:
lr = 0x00000001279c1a5c
Lr after pacibsp
lr = 0x74588001279c1a5c
after some time, this lr is passed to
address SharedRuntime::raw_exception_handler_for_return_address
as return_address value
(via forward exception stub)
as a result, raw_exception_handler_for_return_address processes PAC-poisoined pointer and crashes at should_not_reach_here
Dumping bad pointer with additional logging at the end of raw_exception_handler_for_return_address
reveals it's the same pointer:
No exception handler found for exception at 0x74588001279c1a5c - potential problems:
Happens only on release build, fastdebug build has some additional code which prevents that.
While I believe the pacibsp in arm64 ( not arm64e) is a bug of macos beta, it revealed another issue in jvm.
Update: not a macos bug, intended behaviour
- backported by
-
JDK-8267526 [macos_aarch64] InterpreterRuntime::throw_pending_exception messing up LR results in crash
- Resolved
-
JDK-8267537 [macos_aarch64] InterpreterRuntime::throw_pending_exception messing up LR results in crash
- Resolved
-
JDK-8267622 [macos_aarch64] InterpreterRuntime::throw_pending_exception messing up LR results in crash
- Resolved
-
JDK-8267780 [macos_aarch64] InterpreterRuntime::throw_pending_exception messing up LR results in crash
- Resolved
-
JDK-8267790 [macos_aarch64] InterpreterRuntime::throw_pending_exception messing up LR results in crash
- Resolved
-
JDK-8267607 [macos_aarch64] InterpreterRuntime::throw_pending_exception messing up LR results in crash
- Closed
-
JDK-8268614 [macos_aarch64] InterpreterRuntime::throw_pending_exception messing up LR results in crash
- Closed
- links to
-
Commit openjdk/jdk13u-dev/dd8262db
-
Commit openjdk/jdk15u-dev/a0b1ba19
-
Commit openjdk/jdk16u/410f742b
-
Commit openjdk/jdk/ca93399a
-
Review openjdk/jdk13u-dev/226
-
Review openjdk/jdk15u-dev/64
-
Review openjdk/jdk16u/121
-
Review openjdk/jdk/4115