This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/4662] New: setjmp doesn't specify __attribute__((returns_twice))
- From: "bugzilla at ryancocks dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 18 Jun 2007 16:52:38 -0000
- Subject: [Bug libc/4662] New: setjmp doesn't specify __attribute__((returns_twice))
- Reply-to: sourceware-bugzilla at sourceware dot org
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.