Hi Mark,
Interesting discovery. Read comments below.
On Sun, Aug 25, 2002 at 08:52:43PM +0200, Mark Wielaard wrote:
> I can now run Hello World out of the box without patching
> FileIn/Outputstream and from the normal user classpath
> (including from jar files)!
>
> The problem is in native.c (and clearly marked as such...)
>
> @@ -1241,7 +1241,10 @@
> case SVM_TYPE_BOOLEAN:
> {
> /* don't forget about little/big endian alignment */
> - params[0].jint = *((jboolean *) &result[0]);
I don't see what's wrong in that code (maybe I'm blind too;-). The
call to ffi_call() was given a pointer to a location to store the
result value. The pointer (seen by ffi_call as (void *)) was
&result[0]. "Previously" ffi_prep_cif() told the ffi library that
this pointer would be a pointer to a "jboolean" variable to hold the
jboolean return value. So, at first glance, this code seems correct,
to me.
Now, reading the /usr/share/doc/libffi2/README file, I noticed that
there are potential problems on the PPC. These problems seemed
related to structures, not to primitive type values, though.
Maybe I am missing something?... Probably doing PPC libffi tests
would be the right thing to do, but I do not have time, just now;-)
Thanks for your work!
Etienne
--
Etienne M. Gagnon http://www.info.uqam.ca/~egagnon/
SableVM: http://www.sablevm.org/
SableCC: http://www.sablecc.org/
|