-
Bug
-
Resolution: Fixed
-
P4
-
13
-
b14
-
ppc
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8223459 | 11.0.4 | Gustavo Romero | P4 | Resolved | Fixed | b02 |
Currently runtime/ErrorHandling/ErrorHandler.java test and possible other tests that call VMError::controlled_crash() in order to crash the JVM in a controlled way will pass for case 13 (bad function pointer case) on big-endian machines - which default to ABI ELFv1 - but due to a _wrong reason_: in the current state it does not define correctly a function descriptor (only used on ABI ELFv1, but not on ABI ELFv2) and a SIGSEGV is generated before the bad function is effectively called.
In the current state f = 0xF is taken on BE as a pointer to the function descriptor (obeying the ABI ELFv1) that will be used for loading the bad function pointer - from offset 0. It's that load instruction loading from offset 0 of address 0xF (ld r10, 0(0xf)) that triggers the SIGSEGV. That SIGSEGV is a Data Storage Interruption instead of a Instruction Data Interruption (which is triggered when a branch to a bad function happens).
The issue can be simply solved by correctly defining a function descriptor which contains a bad function pointer at offset 0 and then calling the function using that function descriptor (only on PPC64 BE, which uses, by default, ABI ELFv1).
In the current state f = 0xF is taken on BE as a pointer to the function descriptor (obeying the ABI ELFv1) that will be used for loading the bad function pointer - from offset 0. It's that load instruction loading from offset 0 of address 0xF (ld r10, 0(0xf)) that triggers the SIGSEGV. That SIGSEGV is a Data Storage Interruption instead of a Instruction Data Interruption (which is triggered when a branch to a bad function happens).
The issue can be simply solved by correctly defining a function descriptor which contains a bad function pointer at offset 0 and then calling the function using that function descriptor (only on PPC64 BE, which uses, by default, ABI ELFv1).
- backported by
-
JDK-8223459 Fix bad function case for controlled JVM crash on PPC64 big-endian
- Resolved
- relates to
-
JDK-8080684 PPC64: Fix little-endian build after "8077838: Recent developments for ppc"
- Resolved
-
JDK-8221410 PPC64: Remove get_stack_bang_address workaround
- Closed
-
JDK-8261310 PPC64 Zero build fails with 'VMError::controlled_crash(int)::FunctionDescriptor functionDescriptor' has incomplete type and cannot be defined
- Resolved
-
JDK-8220794 PPC64: Fix signal handler for SIGSEGV on branch to illegal address
- Resolved