Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.9.3
-
Component/s: Instruction Architecture: PowerPC, Operating System: AIX, Runtime: JNI
-
Labels:None
Description
I've finally had some time to dig into why pcc32-linux is fairly stable while ppc32-aix is fairly broken.
At least one cause is that the native method stack conventions for AIX have always been just a tiny bit wrong (known problem). In particular, the Jikes RVM stackframe convention "steals" the saved CR word of the AIX stackframe to hold the compiled method id. The callee method uses this slot to save the conditions registers if it wants to use one of the 3 non-volatile conditions registers (CR2, CR3, CR4). This is fairly rare, so we've been able to "get away" with this in the past. (we've long since fixed the problem for sysCall, because it was easy to do so).
The native method java.io.VM_File.toCannonicalForm is being compiled by gcc to save/restore CR (verified via objdump). As a result, if we take a GC while this native is on the stack (which can happen because it calls the JNI function NewStringUTF), the stack walking code attempts to interpret the saved CR as a compiled metthod id and mayhem ensures....
The fix is to use the same mini-frame structure that we use for Linux (and also more or less use for doing a sysCall in the baseline compiler on AIX). This is going to be somewhat involved (which is why it wasn't done when we fixed the same problem for sysCalls), but at this point I think is no longer avoidable if we want to get AIX working again.
1. |
Remove support for PPC/Mac OSX from JNI compiler | |
|
Unassigned |
fixed in r14201.