delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/07/01/10:23:39

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:date:from:to:subject:message-id
:mime-version:content-type; q=dns; s=default; b=eQfZjnW+4eNlOEmJ
esh2Z8wHGeEqt4/xSafqFkLBAA9CBfCcHV4qP0mTkcpkEtzvZcdR4YLOujmD37LM
OSPLiHdP/k5WMp9JGDRfDxafmYNqblON3tlO/1AbC86Pvxg4egxqCfr0DJq1t1CP
hJv8PXgTDj7zCB0eIHxML0AWdaQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:date:from:to:subject:message-id
:mime-version:content-type; s=default; bh=GAlYK9b+2iloh5fW6lMjiP
axu80=; b=fffZ9jDwJNi1eZ0szDzolz7w2HegB1eealxdngumtuFA/JmF/2j2yH
70NjyfUzD6GNcY8kpJEDEQo7fswAA2AlGV0ZsNwqLsKlvYNB1f/ymWBtxjc9zbty
c2zko6wdMGebE8hnj34MP6iHyfMfRYCH8fnUKnVFAtMY3vkqP7RY0=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-HELO: localhost.localdomain
Reply-To: cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=AWL,BAYES_00,EXECUTABLE_URI,KAM_EXEURI,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2
Date: Wed, 1 Jul 2015 16:10:48 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: [ANNOUNCEMENT] TEST RELEASE: Cygwin 2.1.0-0.3
Message-Id: <announce.20150701141047.GO2918@calimero.vinschen.de>
MIME-Version: 1.0
User-Agent: Mutt/1.5.23 (2014-03-12)

Hi Cygwin friends and users,


I released a third TEST version of Cygwin.  The version number is
2.1.0-0.3.

This test release is mostly for interested *developers*.

The important news which needs some testing is the implementation of
sigaltstack(2) and the underlying implementation of running a signal
handler on the alternate signal stack.

Two changes compared to the previous test release:

- The ss_flags returned by sigaltstack were not safe against the
  application longjmp'ing from the signal handler.

- An old problem which just didn't show up without sigaltstack support:
  Forking after recovering from a stack overflow crashed the child
  process due to the way the stack is set up in the child.

Implementation details:

- The alternate signal stack installed via sigaltstack is only valid for
  the current thread.  Each thread must call its own sigaltstack.  On
  pthread_create, the alternate signal stack setting of the calling
  thread is *not* propagated to the newly created thread.  This follows
  current Linux semantics.

- The alternate signal stack is a minimal stack.  Certain datastructures
  used by Cygwin (_cygtls area) and Windows (on 32 bit: exception
  records) are not copied over to the alternate signal stack.  The stack
  settings in the Thread Environment Block (TEB) are not reflecting the
  current alternate stack while running the signal handler.  The TEB
  will still point to the original thread stack.  This seems to work
  nicely in my testing, but there may be Windows functions which stop
  working in this scenario.

- The volatile registers and the original stack registers are stored at
  the base of the alternate stack.  If you screw this up while running
  the signal handler, your thread is doomed on return to the caller.

I'd be grateful if curious developers would give this new sigaltstack
implementation a whirl and report back if it's working for them as
desired/expected.  And if not, simple reproducers in plain C are most
welcome in this case.  Discussing aspects of this implementation may be
best handled on the cygwin-developers mailing list or the
#cygwin-developers IRC channel on Freenode.


All changes in this release so far:
===================================

What's new:
-----------

- First cut of an implementation to allow signal handlers running on an
  alternate signal stack.
  
- New API sigaltstack, plus definitions for SA_ONSTACK, SS_ONSTACK, SS_DISABLE,
  MINSIGSTKSZ, SIGSTKSZ.

- New API: sethostname.


Bug Fixes
---------

- Enable non-SA_RESTART behaviour on threads other than main thread.
  Addresses: https://cygwin.com/ml/cygwin/2015-06/msg00260.html

- Try to handle concurrent close on socket more gracefully
  Addresses: https://cygwin.com/ml/cygwin/2015-06/msg00235.html

- Fix fork failing after the parent recovered from a stack overflow.
  Addresses: https://cygwin.com/ml/cygwin/2015-06/msg00384.html


To install 32-bit Cygwin use https://cygwin.com/setup-x86.exe
To install 64 bit Cygwin use https://cygwin.com/setup-x86_64.exe


Have fun,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

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