bad news re: mingw exceptions

Bryce McKinlay bryce@waitaki.otago.ac.nz
Thu Feb 28 16:08:00 GMT 2002


Adam Megacz wrote:
>>This is declared in some header which is #included from all the CNI 
>>headers.
>>>>Yes, it's pulled in by javaprims.h, but not by cni.h. Is that how it's
>supposed to work?
>
cni.h gets it via Object.h.
>>If its missing __g++_eh_personality or some such symbol, you're using 
>>>>Yeah, that was it, but as I mentioned earlier in this message, it's
>moot since even with pragma java_exceptions, exceptions written in C++
>work. Very strange, huh?
>
Not if my builtins theory is correct ;-)
>>My first suspect would be the builtins patch.
>>>>Can you give me a pointer to more info on this? I'll roll my source
>tree back to before the patch was applied and try again.
>
2002年01月22日 Tom Tromey <tromey@redhat.com>
 * decl.c (java_init_decl_processing): Use add_predefined_file.
 Predefine RawData.java.
 (predef_filenames): Removed.
 (java_init_decl_processing): Don't register predef_filenames.
 * jcf-parse.c (add_predefined_file): New function.
 (predefined_filename_p): Rewrote.
 (predefined_filename_p): No longer static.
 * decl.c (java_init_decl_processing): Call initialize_builtins.
[...]
It would be good if you could see if it works before and after this 
patch so we can confirm if it is really the problem.
>>Could you compile your minimal test case with "-O2 -S -fverbose-asm" and 
>>post the resulting .s file?
>>>>Thanks a lot for taking the time to look at this.
>>The program below segfaults in _Unwind_SjLj_RaiseException (as a
>result of calling _Jv_Throw()). The disassembly for that function
>contains only two CALLs, one of which is to a fixed address, and the
>other to the value in ecx. The latter call is where it segfaults;
>presumably jumping to an invalid location.
>
Hmm, I don't really know what SJLJ code is supposed to look like, but 
this description certainly makes it sound like the jump target was not 
set up right. Perhaps comparing the asm from the C++ example to the gcj 
output would reveal more.
regards
Bryce.


More information about the Java mailing list

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