This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH] Fix FFI return type for closures in the java interpreter
- From: Tom Tromey <tom at tromey dot com>
- To: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- Cc: "java-patches\ at gcc dot gnu dot org" <java-patches at gcc dot gnu dot org>, "'gcc-patches\ at gcc dot gnu dot org' \(gcc-patches\ at gcc dot gnu dot org\)" <gcc-patches at gcc dot gnu dot org>, "per\ at bothner dot com" <per at bothner dot com>, "aph\ at redhat dot com" <aph at redhat dot com>, Aurelien Jarno <aurelien at aurel32 dot net>
- Date: Mon, 27 Jun 2016 15:20:20 -0600
- Subject: Re: [PATCH] Fix FFI return type for closures in the java interpreter
- Authentication-results: sourceware.org; auth=none
- References: <6D39441BF12EF246A7ABCE6654B023537E45FD9F at HHMAIL01 dot hh dot imgtec dot org>
>>>>> "Matthew" == Matthew Fortune <Matthew.Fortune@imgtec.com> writes:
Matthew> I've identified a latent bug in the java interpreter that affects MIPS
Matthew> n32 and n64 ABIs both little and big endian and, I presume, any 64-bit
Matthew> big endian target with int as 32-bit.
Thanks.
Matthew> I mentioned in my earlier post about a possible similar issue in the
Matthew> lang/reflect/natVMProxy.cc code (unbox function) by code inspection. I
Matthew> don't know how to trigger this code but perhaps someone can advise.
It's a bit complicated, and it's been a while since I looked at any of
this, but I think what you want to do is make an InvocationHandler that
handles some method returning "int" (maybe hashCode would work), then
make a Proxy class that wraps it. Then, make an instance of the proxy
class and call the method.
Matthew> libjava/
Matthew> * interpret-run.cc: Use ffi_arg for FFI integer return types.
Matthew> libjava/testsuite/
Matthew> * libjava.jar/arraysort.java: New file.
Matthew> * libjava.jar/arraysort.jar: New file.
Matthew> * libjava.jar/arraysort.out: New file.
Matthew> * libjava.jar/arraysort.xfail: New file.
This is ok.
Tom