#451 can't return JNI global refs from C to Java

JNI (27)

Our JNI function call implementation was written before Jikes RVM had global references. We can't return global refs to Java code. (As soon as I commit the JNI 1.2 and 1.4 code, this will include weak global references).

The problem is in VM_JNICompiler.java, where we generate code to just perform a simple lookup into the table of local refs. We need to make the code slightly more complicated so that it will work with global refs too.


  • Steven Augart

    Steven Augart - 2004-06-16

    In the short term, this could be improved by checking whether an object reference is a negative number. If it is, then display an error message and abort execution. In the long term, of course, properly implementing it is the way to go.

    This can be downgraded from a priority 7 bug to priority 5 once we have this short-term improvement in place.

  • Ian Rogers

    Ian Rogers - 2005-11-22

    Logged In: YES

    I'm speculating that this is what's breaking the GTK peers
    at the moment (see bug 1147592 "AWT is broken"). Is there
    any progress on this? The temporary fix might shine light on
    the GTK peer error messages.

    Thanks, Ian

  • Peter Donald

    Peter Donald - 2007-06-28

    Logged In: YES
    Originator: NO

    Fixed in r12810


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks