This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Slowness problem due to sjlj-exceptions for Octave

Brian Dessent wrote:
> I think you're confusing the two separate issues, or maybe I didn't
> transition from one to the other very clearly.
> The reason we ship with SJLJ is because the Dwarf unwinder (prior to gcc
> 4.3) can't deal with foreign frames.  You can run into this simply by
> writing a Windows GUI app, since the winproc is a callback.

Even if you catch the exception before it plummets through the
Windows API?  It seems clear I am not understanding something
that you're taking as an obvious truth.  So let me try to state
my assumptions in case they're wrong:

 1) The Dwarf unwinder only needs to understand the frames that it
    is considering unwinding.  If an exception is thrown and caught
    within a contiguous sequence of gcc frames, it doesn't matter
    what strange or foreign structures are deeper in the stack,
    because the unwinder never sees them.

 2) It's necessary or prudent to catch gcc exceptions before they
    fall into windows callback code.  I've never tried throwing a
    g++ exception in a winproc handler and seeing if it makes
    an express journey through user32.dll and back to the message
    loop; but even if it seemed to work I'd be wary that windows
    cleanup was being missed.

I guess if either of those two assumptions are wrong then I see why
sjlj would be needed, but otherwise I don't understand the difficulty.



Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]