Wrong exception handler called?

Godmar Back gback@cs.utah.edu
Sun May 21 10:25:00 GMT 2000


> 
> You could also try the "patch" I suggested in the email above
> and see if the problem goes away.  Of course, that patch is not really a fix.
> I suggested a while ago to Alexandre that someone add an assertion 
> "rtl_stack == &permanent_obstack" to gen_exception_label (as the comment 
> there demands).  However, if one adds such an assumption, it would fail 
> regularly for the java front-end, which may be indicative of a 
> deeper-lying problem.
> 

Interestingly enough, the comment was changed by Jason Merrill on March 8:

RCS file: /cvs/gcc/egcs/gcc/except.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -r1.119 -r1.120
569c570
< /* get an exception label. These must be on the permanent obstack */
---
> /* Get an exception label.  */

So I assume things have changed and people have found a different way
to ensure that exception labels don't get freed and their memory addresses
get reused until the end of the compilation when the exception handler table 
is output(?)

I don't immediately see how; in push_eh_entry, entry->exception_handler_label 
still refers to the exception label returned by gen_exception_label(), which, 
unless it's allocated on the permanent_obstack, could be freed.  Who knows.

	- Godmar



More information about the Java mailing list