Exceptions: the "gij bug"

Godmar Back gback@cs.utah.edu
Mon Dec 6 08:42:00 GMT 1999


 Bryce,
I know how hard it is to come up with a self-contained testcase.
I tried to reproduce one and failed. I stopped trying when I realized
that the bug would either be triggered or avoided depending on
whether I changed a completely different place in the source, but that's
the problem with dangling pointers. Btw, while looking at the code,
it appeared to me that gcc has some provisions to use some kind of
gc mechanism internally (ggc), but apparently this is turned off
in my configuration. Does anybody know more about this?
 I don't know what could be causing your problem, but you should be able 
to figure it out by simply using gdb and seeing why it aborts. Just look
at the backtrace and see where it __terminates.
If __throw aborts because exception handling information is missing
for a given frame, find that frame and verify in the .s file that
the exception handling information is there. It could also be that
you're not compiling some files with -fexceptions, though this is
unlikely.
If __throw aborts because there's no matching handler, put a break point 
or printf in libgcj's match function and see what's going on.
	- Godmar
>> Godmar's EH patch prompted me to revisit the exception handling problems
> in cvs gcc. Unfortunately, even with the latest gcc tree and Godmars
> patch applied, exception problems still seem to be plaguing libgcj when
> compiled with cvs gcc. The problem I'm talking about is most easily seen
> if you try to run gij with an invalid class name - the call to
> Class.forName() fails in its attempt to throw the
> ClassNotFoundException, and libgcj aborts.
>> Unfortunately I've been unsuccessful in coming up with a test case that
> reproduces this problem in a self-contained way, despite its being 100%
> reproducible in various parts of libgcj.
>> Anyone got any clues as to what might be causing this? All I know is
> that it works in gcc 2.95.2, and its broken in cvs gcc.
>> [ bryce ]
>>


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /