delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/09/07/15:47:45

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
Subject: Re: Slowness problem due to sjlj-exceptions for Octave
Message-Id: <20070907194723.8EC2A73D49@caffeine.csclub.uwaterloo.ca>
Date: Fri, 7 Sep 2007 15:47:23 -0400 (EDT)
From: rridge AT csclub DOT uwaterloo DOT ca (Ross Ridge)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Dave Korn wrote:
>   Right, so IOW, the SEH support does all the required unwinding for us.
> Ultimately I guess that's the only solution that's going to be both complete
> and correct.

Well, that is essentially the solution MinGW is using now with SJLJ
exceptions.  MSVCRT's longjmp() is implemented using a SEH forced unwind.

Brian Dessent writes:
>Well, assuming that none of these foreign frames do any kind of
>-fomit-frame-pointer style optimizations, it should be possible to
>implement a fallback unwinder that simply ignores the frame and advances
>one frame up and resumes the table-based unwinding.

I thought about the possibilty mixing the two exception handling methods
and having the MinGW try to unwind both the DWARF and SEH frames in
parallel.  Unfortnately, because they do use FPO, I think the best you
can do is unwind DWARF frames until you get to the callback and then
unwind SEH frames.  I don't think there's anyway you can reliably pick
up the DWARF frames again, and so it wouldn't be a better solution.

>And that's what (I thought) the recent w32-unwind.h contribution in
>4.3 does, but I could be wrong.

It looks like it's a crude hack for the specific problem of unwinding
through "signal handlers".  It's dependent on both specific instruction
sequences used in the operating system code that calls these handlers
and the layout of their stack frames.  I wouldn't be surprised if it
doesn't work on Win9x, checked builds of Windows XP, Wine or in some
other context that the author might not have tested it on.

					Ross Ridge


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019