X-Recipient: archive-cygwin@delorie.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@ajrh.net>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Slowness problem due to  sjlj-exceptions for Octave
References: <20070905080321.29259AB0.matsuoka@mol.nagoya-u.ac.jp> <46DE0C86.61C0ABB0@dessent.net> <46DFFE96.70907@ajrh.net> <46E006AB.F600C446@dessent.net>
In-Reply-To: <46E006AB.F600C446@dessent.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
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@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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/

