[Bug libgcj/21285] gij fails to handle NullPointerException exception

2005-05-12 Thread tsv at solvo dot ru

--- Additional Comments From tsv at solvo dot ru  2005-05-12 08:25 ---
Your patch works a lot better than mine. Just tested and ant started to work.
Thank you very much.


-- 
   What|Removed |Added

   Severity|normal  |critical
  Component|libffi  |libgcj


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21285


[Bug libgcj/21285] gij fails to handle NullPointerException exception

2005-05-03 Thread tromey at gcc dot gnu dot org

--- Additional Comments From tromey at gcc dot gnu dot org  2005-05-03 
18:23 ---
Could you run gij under gdb and attach a stack trace to this PR?
That might help.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21285


[Bug libgcj/21285] gij fails to handle NullPointerException exception

2005-05-03 Thread tsv at solvo dot ru

--- Additional Comments From tsv at solvo dot ru  2005-05-03 19:36 ---
Here it is. I tried to debug it, but it does a lot of things I have a little
knowlegde about.

(gdb) bt
#0  _Jv_Throw (value=0x20001b1b220) at ../../../libjava/exception.cc:113
#1  0x02b6c7dc in _Jv_InterpMethod::run (this=0x20001c72be0,
retp=0x11fc956a0, args=0x11fc955f0) at ../../../libjava/interpret.cc:3247
#2  0x02b6ca88 in _Jv_InterpMethod::run_class (ret=0x11fc956a0,
args=0x11fc955f0, __this=Variable __this is not available.
) at ../../../libjava/interpret.cc:302
#3  0x0200010edad0 in ffi_java_translate_args (cif=0x20001c61358,
rvalue=0x11fc956a0, avalue=0x11fc95650, user_data=0x20001c61318)
at ../../../libffi/src/java_raw_api.c:309
#4  0x0200010ee044 in ffi_closure_osf_inner (closure=Variable closure is
not available.
)
at ../../../libffi/src/alpha/ffi.c:248
#5  0x0200010ee1d4 in ffi_closure_osf ()
at ../../../libffi/src/alpha/osf.S:158
#6  0x02b841c8 in gnu::java::lang::MainThread::call_main (
this=0x20001b7fe30) at ../../../libjava/gnu/java/lang/natMainThread.cc:47
#7  0x020001bed400 in ?? ()
warning: Hit heuristic-fence-post without finding
warning: enclosing function for address 0x20001bed400
#8  0x02b841c8 in gnu::java::lang::MainThread::call_main (
this=0x20001b7fe30) at ../../../libjava/gnu/java/lang/natMainThread.cc:47
#9  0x020001bed400 in ?? ()
warning: Hit heuristic-fence-post without finding
warning: enclosing function for address 0x20001bed400
#10 0x02b841c8 in gnu::java::lang::MainThread::call_main (
this=0x20001b7fe30) at ../../../libjava/gnu/java/lang/natMainThread.cc:47
#11 0x0203108c in main () from /usr/lib/libgij.so.6
#12 0x0002 in ?? ()
Cannot access memory at address 0xfffe
(gdb)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21285


[Bug libgcj/21285] gij fails to handle NullPointerException exception

2005-05-03 Thread tsv at solvo dot ru

--- Additional Comments From tsv at solvo dot ru  2005-05-03 19:46 ---
Here is another stack dump from attempt of running the ant:
exec /usr/lib/jvm/java/bin/java -classpath
/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/share/java/xml-commons-apis.jar:/usr/share/java/jakarta-commons-logging.jar:/usr/share/java/ant/ant-commons-logging.jar:/usr/lib/jvm/java/lib/tools.jar:/usr/share/java/jdtcore.jar
-Dant.home=/usr/share/ant -Dant.library.dir=/usr/share/ant/lib
org.apache.tools.ant.launch.Launcher -lib 

The ra member of context parameter has bad value, but how it got it ... I
could not trace.

This issue might not be related to original one, but it fails in unwind logic
too (so it could give more info).

My test case (and ant) worked on gcc 3.4.3 version built on the environment.

If you need more info about my environment I would glad to tell.

Thank you.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 2199023384624 (LWP 32406)]
0x020001886254 in alpha_fallback_frame_state (context=0x11f831c28,
fs=0x11f831e68) at ../../gcc/config/alpha/linux-unwind.h:45
45if (pc[0] != 0x47fe0410   /* mov $30,$16 */
(gdb) bt
#0  0x020001886254 in alpha_fallback_frame_state (context=0x11f831c28,
fs=0x11f831e68) at ../../gcc/config/alpha/linux-unwind.h:45
#1  0x020001887eac in uw_frame_state_for (context=0x11f831c28,
fs=0x11f831e68) at ../../gcc/unwind-dw2.c:978
#2  0x02000188a0bc in _Unwind_Backtrace (
trace=0x20001981700 backtrace_helper, trace_argument=0x11f832320)
at ../../gcc/unwind.inc:296
#3  0x020001981804 in backtrace () from /lib/tls/libc.so.6.1
#4  0x02b833ec in gnu::gcj::runtime::StackTrace::fillInStackTrace (
this=0x20002839188, maxlen=Variable maxlen is not available.
)
at ../../../libjava/gnu/gcj/runtime/natStackTrace.cc:60
#5  0x02c5eaf4 in gnu.gcj.runtime.StackTrace.StackTrace(int) (
this=0x20002839188, n=128)
at ../../../libjava/gnu/gcj/runtime/StackTrace.java:67
#6  0x02bce9c4 in
java.lang.VMThrowable.fillInStackTrace(java.lang.Throwable) (t=Variable t is
not available.
) at ../../../libjava/java/lang/VMThrowable.java:80
#7  0x02bcbd20 in java.lang.Throwable.fillInStackTrace() (
this=0x200027f99a0) at ../../../libjava/java/lang/Throwable.java:502
#8  0x02bcb2d4 in java.lang.Throwable.Throwable(java.lang.String) (
this=0x200027f99a0, message=0x2000284d540)
at ../../../libjava/java/lang/Throwable.java:157
#9  0x02bb4de8 in java.lang.Exception.Exception(java.lang.String) (
this=Variable this is not available.
) at ../../../libjava/java/lang/Exception.java:77
#10 0x02bdb818 in java.io.IOException.IOException(java.lang.String) (
this=Variable this is not available.
) at ../../../libjava/java/io/IOException.java:71
#11 0x02b7e294 in gnu::gcj::Core::create (name=Variable name is not
available.
)
at ../../../libjava/gnu/gcj/natCore.cc:111
#12 0x02c9d0a8 in gnu.java.net.protocol.core.Connection.connect() (
this=Variable this is not available.
) at ../../../libjava/gnu/java/net/protocol/core/Connection.java:50
#13 0x02c9d348 in gnu.java.net.protocol.core.Connection.getHeaders() (
this=0x20002842f78)
at ../../../libjava/gnu/java/net/protocol/core/Connection.java:154
#14 0x02c9d6d8 in
gnu.java.net.protocol.core.Connection.getHeaderField(java.lang.String)
(this=0x20002842f78, name=0x20001ac9200)
at ../../../libjava/gnu/java/net/protocol/core/Connection.java:69
#15 0x02d35174 in
java.net.URLConnection.getHeaderFieldInt(java.lang.String, int) (this=Variable
this is not available.
) at ../../../libjava/java/net/URLConnection.java:343
#16 0x02d34f98 in java.net.URLConnection.getContentLength()
(this=Variable this is not available.
)
at ../../../libjava/java/net/URLConnection.java:220
#17 0x02d320a4 in
java.net.URLClassLoader$RemoteURLLoader.getResource(java.lang.String)
(this=0x20001b1d428, name=0x200028480c0)
at ../../../libjava/java/net/URLClassLoader.java:475
#18 0x02d33b74 in java.net.URLClassLoader.findClass(java.lang.String) (
this=0x20001b7fea0, className=0x2000284d5c0)
at ../../../libjava/java/net/URLClassLoader.java:921
#19 0x02c58d84 in
gnu.gcj.runtime.BootClassLoader.bootLoadClass(java.lang.String)
(this=0x20001b7fea0, name=0x2000284d5c0)
---Type return to continue, or q return to quit---
at ../../../libjava/gnu/gcj/runtime/BootClassLoader.java:52
#20 0x02b9bf44 in java::lang::VMClassLoader::loadClass (
name=0x2000284d5c0, resolve=0 '\0')
at ../../../libjava/java/lang/natVMClassLoader.cc:205
#21 0x02bb2e7c in java.lang.ClassLoader.loadClass(java.lang.String,
boolean) (this=0x20001b7ff80, name=0x2000284d5c0, resolve=false)
at ../../../libjava/java/lang/ClassLoader.java:304
#22 0x02bb2e5c in 

[Bug libgcj/21285] gij fails to handle NullPointerException exception

2005-05-03 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-03 
19:52 ---
Hmm, could it be that the libffi does not handle exceptions.

-- 
   What|Removed |Added

   Severity|critical|normal


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21285


[Bug libgcj/21285] gij fails to handle NullPointerException exception

2005-05-03 Thread tsv at solvo dot ru

--- Additional Comments From tsv at solvo dot ru  2005-05-03 20:54 ---
How could I check that?
I ran make check in libffi library and it has not produced any errors.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21285


[Bug libgcj/21285] gij fails to handle NullPointerException exception

2005-05-03 Thread tsv at solvo dot ru

--- Additional Comments From tsv at solvo dot ru  2005-05-03 21:49 ---
So far I was able to debug to interpret.cc:3211.
It seems that unwind logic worked correctly (as far as I could understand) and
catch handler was called. The logic here didn't find exception handler and
thrown exception again that lead to abort (since no more handlers were 
found).

I am going to recompile interpret.cc without optimization and check again if my
assumptions are true. Could DIRECT_THREADED define doesn't work on alpha linux?

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21285