re PR libgcj/15001 ([3.4 only] Using JNI with interpreter and interface methods yields SIGSEGV)
PR java/15001 * testsuite/libjava.jni/iface.c: New file. * testsuite/libjava.jni/iface.out: New file. * testsuite/libjava.jni/iface.java: New file. From-SVN: r92445
This commit is contained in:
parent
f8c940c55c
commit
90d8362105
4 changed files with 76 additions and 0 deletions
27
libjava/testsuite/libjava.jni/iface.java
Normal file
27
libjava/testsuite/libjava.jni/iface.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
// JNI calls via an interface method were broken in a couple releases.
|
||||
|
||||
interface mycomp
|
||||
{
|
||||
int compareTo(Object x);
|
||||
}
|
||||
|
||||
public class iface implements mycomp
|
||||
{
|
||||
static
|
||||
{
|
||||
System.loadLibrary("iface");
|
||||
}
|
||||
|
||||
public int compareTo (Object x)
|
||||
{
|
||||
System.out.println ("hi maude");
|
||||
return 3;
|
||||
}
|
||||
|
||||
public native void doCalls(Object x);
|
||||
|
||||
public static void main (String[] args)
|
||||
{
|
||||
new iface().doCalls(args);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue