From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72920 invoked by alias); 20 Jul 2015 11:20:53 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 72909 invoked by uid 89); 20 Jul 2015 11:20:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: calimero.vinschen.de Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 20 Jul 2015 11:20:52 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 84E66A80955; Mon, 20 Jul 2015 13:20:49 +0200 (CEST) Date: Mon, 20 Jul 2015 11:20:00 -0000 From: Corinna Vinschen To: cygwin-apps@cygwin.com Subject: Re: [ANNOUNCEMENT] Updated for 32-bit, new for 64-bit: libsigsegv-2.10-2 Message-ID: <20150720112049.GP3864@calimero.vinschen.de> Reply-To: cygwin-apps@cygwin.com Mail-Followup-To: cygwin-apps@cygwin.com References: <55AA9882.1030407@redhat.com> <20150718201106.GE3864@calimero.vinschen.de> <55AAB9F3.3070505@redhat.com> <20150719083756.GB19825@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="B3NBd8mrXZtPJEYR" Content-Disposition: inline In-Reply-To: <20150719083756.GB19825@calimero.vinschen.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-07/txt/msg00132.txt.bz2 --B3NBd8mrXZtPJEYR Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2697 On Jul 19 10:37, Corinna Vinschen wrote: > On Jul 18 14:41, Eric Blake wrote: > > On 07/18/2015 02:11 PM, Corinna Vinschen wrote: > > > OTOH, calling certain Cygwin functions might require lots of stack. > > > E.g. open/read/write/close requires more than 2K stack, so MINSIGSTKSZ > > > shouldn't be too small. > > >=20 > > > So, what about MINSIGSTKSZ =3D=3D 8192 and SIGSTKSZ =3D=3D 32768? > > >=20 > > > Or MINSIGSTKSZ =3D=3D 16384 and SIGSTKSZ =3D=3D 65536? > > >=20 > > > That could go into Cygwin 2.2.0 which I could release next week. > >=20 > > Might help, but feels a little unclean. As I said, old clients of > > libsigsegv were using the fallback definition of 16k; setting > > MINSIGSTKSZ to 16k would let the sigaltstack() succeed where it is now > > failing, but if cygwin ever consumes all 16k rather than the current 400 > > or so bytes, that leaves nothing for the application (normally, an > > application only expects to use SIGSTKSZ - MINSIGSTKSZ for its own use, > > if it uses the system-recommended sizing). >=20 > Cygwin shouldn't really consume 16K stack by itself when called from the > application. Large buffers should use the tmp_pathbuf facility throughou= t. >=20 > But there are still functions using big stack buffers. I mention them > here for bookkeeping as much as for information and discussion: >=20 > - Debugging code in dcrt0.cc, initial_env() uses 96K stack on process > startup. Usually disabled. Non-critical. >=20 > - dll_list::alloc, called during DLL initialization uses 64K stack. > Calling dlopen from the alternate stack would be fatal. The buffer > is used in code called under Windows loader lock conditions, so this > could be converted to a static buffer. >=20 > - A function called error_start_init uses 32K of stack and is called > if the env var CYGWIN is set to "error_init:...". That's very unlikely > from a SEGV handler. Not nice, but probably non-critical. >=20 > - pinfo::status_exit is called when a process exits due to a signal > from Windows. This usually shouldn't happen inside the signal > handler, but it might. pinfo::status_exit uses a 32K buffer. >=20 > - Stracing a process ends up using >48K of stack. >=20 > That means even the current 32K are not quite sufficient, though, only > in unlikely border cases, apparently. >=20 > Anyway, I plan to change this in the next few days. Given this, I'll > set MINSIGSTKSZ to 8K and SIGSTKSZ to 32K in 2.2. I uploaded snapshots as well as a 2.2.0-0.1 test release. Please give it a try. Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --B3NBd8mrXZtPJEYR Content-Type: application/pgp-signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVrNmRAAoJEPU2Bp2uRE+gbXoQAIqid+0vDeOayuw3RsP5+Zqh t7uMx44ykVwwb0YxvtDwFbNo+1XS0NeM/zQZtkW85IpxbzQ0D76CzSL5+CeqBqzg 7HHcyndQStp/KiCMw2QNCXbXGsgqQh4rJMBE8MYNi+nWpLFzAg3KmuEZeFb88gid ZdFXUNEoeUWNn6TDWxBtiKJvqWaLyRAKM0OSzeob7oJ6Hl0QhC4RsRJjZGVAYzjC 6hfc2YISAAyf7o4AWAWvsn3rP2bxekr2HzV5xdmRBBcU83x29O/Zi+E6eBYdE1Zk RI9RiMhEFfwjTd3H2vn6sv9eM4ubJYSp5yHPNgdlAOoi/vNDCH4gURXrNsBieeVb QHzhQaRj2+WTychRIrmx3yz8fTr2Q1wJHqyilJ2tzdukAej2/J2Yi5jmWnmsPSrg YOQfnPw0N2apeWJy1/dcb5eHzM4UWppnQgM9CDVpo88CB+cb1C6ZY+GS2uioM5Wm vokCD5bdWEuantiut3I3kvKalIrGpcfPlRwLdO8Cgr4s+YXLOae2N3vFBuI9MSQW gTYSyAlCff+mkmVsWjWHVpcHTJsu0RvbyfGEuvy4LdN7SF1k6xXizI7yLJrlQRN/ G9tiPOWKm4jb14PMj0a4dyc/RxRyUNCpzIDnEtThswS6he2XwLFQQoMWtitvbkcP aVZeFKKGaGh9XKa2Y0Sj =fxpG -----END PGP SIGNATURE----- --B3NBd8mrXZtPJEYR--