delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/07/22/07:27:16

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_44,SPF_SOFTFAIL
X-Spam-Check-By: sourceware.org
Message-ID: <4A66F783.1070503@byu.net>
Date: Wed, 22 Jul 2009 05:26:59 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
CC: Bruno Haible <bruno AT clisp DOT org>
Subject: Re: libsigsegv error handling
References: <20090715185636 DOT GA16211 AT ednor DOT casa DOT cgf DOT cx> <4A5F59A1 DOT 1060902 AT gmail DOT com> <20090716195552 DOT GU27613 AT calimero DOT vinschen DOT de> <20090716211823 DOT GC22617 AT ednor DOT casa DOT cgf DOT cx> <20090717085727 DOT GW27613 AT calimero DOT vinschen DOT de> <4A607EE5 DOT 5050306 AT gmail DOT com> <20090717134114 DOT GX27613 AT calimero DOT vinschen DOT de> <loom DOT 20090717T140900-805 AT post DOT gmane DOT org> <4A608C72 DOT 2010504 AT gmail DOT com> <loom DOT 20090717T144655-62 AT post DOT gmane DOT org> <6910a60907220124p1e4fed27kc82869cad4b0f88b AT mail DOT gmail DOT com>
In-Reply-To: <6910a60907220124p1e4fed27kc82869cad4b0f88b@mail.gmail.com>
X-IsSubscribed: yes
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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Reini Urban on 7/22/2009 2:24 AM:
>> Is there a chance that this represents a bug in
>> libsigsegv SEH handling that needs to be reported upstream?
> 
> I'll report that, if it turns out so.

I've already mentioned it to Bruno, and am still working on a fix.  I have
a simple testcase - on cygwin 1.5 or 1.7, calling open(NULL,O_RDONLY)
before installing the libsigsegv handler returns -1 with EFAULT, but
calling it after installing the handler kills the app with a spurious
claim of a sigsegv.  But on Solaris, the same test case returns -1 with
EFAULT in both places.

Since SEH triggers for more reasons than SIGSEGV: the fix HAS to be that
the libsigsegv SEH handler inspects the faulting address, and if it is
stack overflow deals with it immediately (since cygwin has no sigaltstack
for libsigsegv to deal with it after SIGSEGV has been raised), but for
_all other addresses_, libsigsegv must let the address propagate onto the
cygwin SEH handler, and deal with all other faults only if they are
re-raised via a SIGSEGV handler (stack overflow is the only form of
SIGSEGV where an alternate stack is important; all other synchronous SEGV
can be dealt with in-place, and libsigsegv should not change behavior for
SEH faults that cygwin decides are not worthy of a SIGSEGV).

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpm94IACgkQ84KuGfSFAYALxgCfbtFe5LXgS0i/apjaruLU/VFj
D2IAoLhF86bQU7pvqC76D2z+A+mTIdvi
=PUtR
-----END PGP SIGNATURE-----

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

- Raw text -


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