From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28118 invoked by alias); 18 Jun 2007 16:52:48 -0000 Received: (qmail 28037 invoked by uid 48); 18 Jun 2007 16:52:38 -0000 Date: Mon, 18 Jun 2007 16:52:00 -0000 From: "bugzilla at ryancocks dot net" To: glibc-bugs@sources.redhat.com Message-ID: <20070618165238.4662.bugzilla@ryancocks.net> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/4662] New: setjmp doesn't specify __attribute__((returns_twice)) 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: 2007-06/txt/msg00056.txt.bz2 Working recently on ARM i found my this pointer was being corrupted in a method containing a setjmp. When exiting the setjmp via the longjmp the this pointer had been incremented. There was quite a lot of code between where the setjmp and the longjmp were called, and the this pointer wasn't used for the tail end of that code. Gcc was clobbering the this pointer when it went out of use, incrementing it to refer to a member variable. That behaviour should be prevented with __attribute__((returns_twice)) in the headers, likewise for vfork, but returns_twice doesn't seem to be specified anywhere in glibc (cvs.) I can try and put a test case together, I refrained so far because I'm a little busy and it seems obvious that the flag needs to be specified. (and perhaps implemented in gcc too?..) -- Summary: setjmp doesn't specify __attribute__((returns_twice)) Product: glibc Version: unspecified Status: NEW Severity: normal Priority: P2 Component: libc AssignedTo: drepper at redhat dot com ReportedBy: bugzilla at ryancocks dot net CC: glibc-bugs at sources dot redhat dot com http://sourceware.org/bugzilla/show_bug.cgi?id=4662 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.