delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/07/24/14:35:45

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL
X-Spam-Check-By: sourceware.org
Message-ID: <4A69FEF9.9010804@byu.net>
Date: Fri, 24 Jul 2009 12:35:37 -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
Subject: Re: [1.7] Updated: libsigsegv-2.6-1
References: <4A678AC7 DOT 7090303 AT x-ray DOT at> <4A6854F8 DOT 4060204 AT byu DOT net> <20090723144038 DOT GA11519 AT ednor DOT casa DOT cgf DOT cx> <loom DOT 20090723T145926-237 AT post DOT gmane DOT org> <20090723171656 DOT GA6973 AT ednor DOT casa DOT cgf DOT cx> <4A690D27 DOT 3050109 AT gmail DOT com> <20090724020225 DOT GB10306 AT ednor DOT casa DOT cgf DOT cx> <4A6924E7 DOT 9030103 AT gmail DOT com> <20090724043005 DOT GA10827 AT ednor DOT casa DOT cgf DOT cx> <6910a60907241054h6bebc6eo279180a0a9fd21b AT mail DOT gmail DOT com>
In-Reply-To: <6910a60907241054h6bebc6eo279180a0a9fd21b@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/24/2009 11:54 AM:
> clisp started using libsigsegv for 2 purposes:
> 1) sigv handling to enable generational garbage collection (enabled on cygwin),
> 2) no-cost stack overflow handling (as with m4, but disabled on clisp's cygwin)
> 
> cygwin has this speciality in libsigsegv handler-win32.c:
> # undef HAVE_STACK_OVERFLOW_RECOVERY
> # define HAVE_STACK_OVERFLOW_RECOVERY 0
> And clisp checks for #if HAVE_STACK_OVERFLOW_RECOVERY

handler-win32.c is the internal implementation detail of libsigsegv.  The
line you are quoting occurs just before handler-win32.c includes
handler-unix.c for the sigsegv recovery, since handler-win32.c is already
taking care of the stack overflow recovery.  The real thing that clisp is
checking for is in sigsegv.h, which does indeed set
HAVE_STACK_OVERFLOW_RECOVERY to 1 on cygwin (thanks to handler-win32.c).

> 
> But segv handling is mandatory for decent performance and only
> stack overflow handling corrupts the cygwin stack.

It seems to me that libsigsegv is not corrupting the cygwin stack - yes,
it is using some undocumented internals (and thus is very fragile if
cygwin makes changes), but it is successfully installing an alternate
stack, and can successfully return from that alternate stack back into the
primary stack (at least, several of the tests in the libsigsegv testsuite
prove this point).

> I could be persuaded to disable stack overflow handling temp. at all
> on cygwin, but Bruno should have the last word on this. Esp. since
> Eric enabled it lately. For m4 I guess.
> But I will not disable the generational garbage collector for clisp on cygwin.

That's the whole point of my recent changes to allow libsigsegv 2.6+ plus
cygwin 1.7.0-52 or newer to do generational garbage collection without
having to bypass any cygwin internals.  In other words, we've just made
cygwin more portable this week, so that libsigsegv can get by with one
less hack: http://lists.gnu.org/archive/html/bug-gnulib/2009-07/msg00092.html

> 
> Eric,
> Where is the upstream discussion happening with you and Bruno?
> On sf.net is only old libsigsegv code, and there's no public mailinglist.

I've been following up on a thread on the bug-gnulib list (since it was
the gnulib list where I first mentioned the m4 crash due to libsigsegv
interference at process shutdown):
http://lists.gnu.org/archive/html/bug-gnulib/2009-07/threads.html#00034

But we do need to repackage libsigsegv to pick up on this; the current
packaging (libsigsegv0-2.6-1) mucks unnecessarily with SEH handling even
for generational garbage collection support.

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

iEYEARECAAYFAkpp/vkACgkQ84KuGfSFAYC0KgCfUTb5LAFlDT2fcK7or6nFbCWN
NX8An2c7Weqc47ahJiY8YOayg1mGq2XP
=oGTm
-----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