GCJ/minGW produced executables and linux/wine

Andrew Haley aph@redhat.com
Tue Mar 4 19:21:00 GMT 2003


Ranjit Mathew writes:
 > > > > Indeed. Has gcj on that target ever worked with DWARF2 exceptions?
 > > >
 > > > Yes, statically linked executables do work fine. Only interpreted
 > > > programs have problems due to the reason (I strongly believe) cited
 > > > above.
 > >
 > >What, even unwinding through invoke() ?
 > 
 > No, not at all, since that ultimately uses libffi as well via
 > _Jv_CallAnyMethodA( ). Ok, so the "work fine" should be taken
 > with this grain of salt. :-P
 > 
 > BTW, I now understand what the original question from you
 > and the one from Jeff meant (sorry, 'am a little thick):
 > 
 > Win32 uses win32_exception_handler( ) in win32.cc via
 > Win32 SetUnhandledExceptionFilter( ) to catch
 > EXCEPTION_ACCESS_VIOLATION (throw NullPointerException), etc.
 > and since SJLJ uses a longjmp to implement "throw", would this
 > create problems? This is similar to catch_segv( ), etc. in
 > prims.cc.
 > 
 > Well honestly, I don't know and I'm surprised that it works
 > on Linux (so signal delivery must be the "last mile" in that
 > the OS doesn't really care if the handler returns or not).
The ANS C standard says that signal handlers may return by doing a
longjmp. But that's what I meant whan I said this is not a signal
handler and may have other restrictions. And it seems like it does
indeed have some restrictions.
 > I can imagine that there would be problems on Win32 because
 > this handler is supposed to return a value to the OS telling
 > it whether to execute the default handler (abort program)
 > or whether the exception has been handled successfully. See
 > MSDN docs for SetUnhandledExceptionFilter( ) or this article
 > for more details:
 > 
 > http://www.microsoft.com/msj/0197/exception/exception.htm
Oh my.
 > However, right now I don't know what better methods there
 > would be to generate a proper NullPointerException,
 > ArithmeticException, etc.
Well, from a very rough reading it looks to me like SEH should be able
to do what Win32 gcj needs.
Andrew.


More information about the Java mailing list

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