jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • RVM
  • RVM-478

Redesign AIX native method Linkage conventions to protect CMID field from being smashed by native code saved CR

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major 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.

  • Options
    • Show All
    • Show Open

Sub-Tasks

1.
Remove support for PPC/Mac OSX from JNI compiler Sub-task Closed Closed Unassigned
 

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
David Grove added a comment - 08/May/08 4:39 PM

fixed in r14201.

Show
David Grove added a comment - 08/May/08 4:39 PM fixed in r14201.

People

  • Assignee:
    Unassigned
    Reporter:
    David Grove
Vote (0)
Watch (0)

Dates

  • Created:
    07/May/08 11:56 AM
    Updated:
    08/May/08 4:39 PM
    Resolved:
    08/May/08 4:39 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.