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

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <46E0D4F7.1050006@ajrh.net>
Date: Fri, 07 Sep 2007 00:35:03 -0400
From: Anthony Heading <anthony AT ajrh DOT net>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Slowness problem due to sjlj-exceptions for Octave
References: <20070905080321 DOT 29259AB0 DOT matsuoka AT mol DOT nagoya-u DOT ac DOT jp> <46DE0C86 DOT 61C0ABB0 AT dessent DOT net> <46DFFE96 DOT 70907 AT ajrh DOT net> <46E006AB DOT F600C446 AT dessent DOT net>
In-Reply-To: <46E006AB.F600C446@dessent.net>
X-Junkmail-Status: score=10/50, host=mr02.lnh.mail.rcn.net
X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A090204.46E0D507.001E,ss=1,fgs=0, ip=207.172.4.11, so=2006-12-09 10:45:40, dmn=5.3.14/2007-05-31
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

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.

Rgds

Anthony

--
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