This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: FYI: interpreter bug fix


Hi Tom,

tets, test, test. ;-)

The mentioned patch fixes the topic with the sqrt (-x). But it breaks
now something else here on darwin.

I do the simple program:
public class my_float {
        public static void main (String[] args) {
        float my_float;
        long my_long;
        my_float = 2;
        my_long = 1;
        my_long = (long)my_float;
        System.out.println ("my_long: "+my_long);
        }
}

Without the patch I get 2, with the patch I get a Bus Error and the
following bt from gdb:

#0  0x00000000 in ?? ()
Cannot access memory at address 0x0
#1  0x000cf744 in ffi_call_DARWIN ()
#2  0x000806e0 in ffi_java_raw_call (cif=0x0, fn=0, rvalue=0x0, raw=0x0)
at ../../../gcc/libffi/src/java_raw_api.c:228
#3  0x0004e008 in
_ZN16_Jv_InterpMethod9continue1EP26_Jv_InterpMethodInvocation
(this=<incomplete type>, inv=0xbffff2c8) at ../../../gcc/libjava/interpret.cc:741
#4  0x0004e8c8 in
_ZN16_Jv_InterpMethod3runEP7ffi_cifPvP7ffi_rawP26_Jv_InterpMethodInvocation
(this=<incomplete type>, cif=0x625d2c, retp=0xbffff4c0, args=0xbffff350,
inv=0xbffff2c8) at ../../../gcc/libjava/interpret.cc:246
#5  0x0004c070 in
_ZN16_Jv_InterpMethod10run_normalEP7ffi_cifPvP7ffi_rawS2_
(cif=0xbfffede4, ret=0x153d58, args=0x31238, __this=0x6268d0) at ../../../gcc/libjava/interpret.cc:370
#6  0x00080790 in ffi_java_translate_args (cif=0x0, rvalue=0x0,
avalue=0x0, user_data=0x0) at ../../../gcc/libffi/src/java_raw_api.c:241
#7  0x00082cd4 in ffi_closure_helper_DARWIN (closure=0x625cf0,
rvalue=0xbffff4c0, pgr=0xbffff43c, pfr=0xbffff458, pst=0xbffff4e8) at ../../../gcc/libffi/src/powerpc/ffi_darwin.c:620
#8  0x000cf810 in ffi_closure_DARWIN ()
#9  0x00044f00 in _ZN3gnu3gcj7runtime11FirstThread9call_mainEv
(this=0xbfffee18) at ../../../gcc/libjava/gnu/gcj/runtime/natFirstThread.cc:46
#10 0x0001fee4 in _ZN3gnu3gcj7runtime11FirstThread3runEv (this=0x61ff80)
at ../../../gcc/libjava/gnu/gcj/runtime/FirstThread.java:54
#11 0x0001ee24 in _Z13_Jv_ThreadRunPN4java4lang6ThreadE
(thread=0x61ff80) at ../../../gcc/libjava/java/lang/natThread.cc:285
#12 0x00004458 in _Z11_Jv_RunMainPN4java4lang5ClassEPKciPS4_b
(klass=0x0, name=0xbffffb0e "my_float", argc=1, argv=0xbffffa5c,
is_jar=false) at ../../../gcc/libjava/prims.cc:1009
#13 0x0000253c in main (argc=-1073745180, argv=0x625b26) at ../../../gcc/libjava/gij.cc:139
#14 0x00002298 in _start ()
#15 0x000020c8 in start ()

Does this point to a problem in ffi_darwin and co?

I'm playing around.

Thanks for hints,

Andreas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]