This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Reminder: Illegal Package-Private Accesses in libgcj
Bryce McKinlay writes:
> On Nov 3, 2003, at 7:23 PM, Ranjit Mathew wrote:
>
> > The problem was that the callback was called
> > from within Win32 OS/system-lib code that
> > of course didn't have any EH frame information
> > causing the libgcc unwinder to abort the program.
> >
> > The fix probably would have been to write
> > a (perhaps complicated) MD_FALLBACK_FRAME_STATE_FOR
> > for this and other such scenarios.
>
> I don't think that would be necessary, at least for Java. It seems like
> a reasonable restriction (for us) not to try and throw through OS
> frames.
>
> > The problematic code idiom seems to be common
> > for Win32 GUI programs in C++, making DW2
> > useless for MinGW for the time being.
>
> So, is the problem:
>
> a) there is/was a bug in the unwinder that causes it to try and throw
> into OS frames even though you have an enclosing try block, or
A NullPointerException makes a callback from OS code into the gcj
handler.
We could avoid worrying about all this when we change libgcj to use
smart pointers. This will mean that all C++ code can generate inline
null pointer checks, so we won't have to trap null pointer exceptions
at all. But unless we do that we have to either use sjlj or unwind
through OS code.
> b) common C++ code on windows expects to be able to throw through the
> OS ?
It does.
Andrew.