From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17203 invoked by alias); 7 Jun 2010 12:05:32 -0000 Received: (qmail 15775 invoked by uid 48); 7 Jun 2010 12:05:14 -0000 Date: Mon, 07 Jun 2010 12:05:00 -0000 Message-ID: <20100607120514.15774.qmail@sourceware.org> From: "christian dot eggers at kathrein dot de" To: glibc-bugs@sources.redhat.com In-Reply-To: <20100605071837.11670.ceggers@gmx.de> References: <20100605071837.11670.ceggers@gmx.de> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug nptl/11670] Variables defined in pthread_cleanup_push() macro may be optimised away which breaks __sigsetjmp X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00074.txt.bz2 ------- Additional Comments From christian dot eggers at kathrein dot de 2010-06-07 12:05 ------- (In reply to comment #2) > Which compiler are you using? I'm using gcc-4.4.4 > Since the variables are not modified between setjmp and longjmp they must > retain their values even after setjmp returns the > second time and the compiler is not allowed to reuse their stack location. > This looks like a compiler bug. I think the compiler has no chance to detect that __sigsetjmp() may return a second time (usual functions don't do that). I think that the "returns_twice" attribute has to be added to the prototype of __sigsetjmp() in pthread.h. The longjmp(3) manpage says that the values of automatic variables are ONLY unspecified if they are changed between setjmp() and longjmp(). Maybe this depends on the "returns_twice" attribute. -- What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW http://sourceware.org/bugzilla/show_bug.cgi?id=11670 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.