public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/4662] New: setjmp doesn't specify __attribute__((returns_twice))
@ 2007-06-18 16:52 bugzilla at ryancocks dot net
  2007-06-18 17:56 ` [Bug libc/4662] " jakub at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: bugzilla at ryancocks dot net @ 2007-06-18 16:52 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-08-22  4:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-18 16:52 [Bug libc/4662] New: setjmp doesn't specify __attribute__((returns_twice)) bugzilla at ryancocks dot net
2007-06-18 17:56 ` [Bug libc/4662] " jakub at redhat dot com
2007-06-19 10:21 ` bugzilla at ryancocks dot net
2007-06-19 10:34 ` jakub at redhat dot com
2007-06-19 15:45 ` bugzilla at ryancocks dot net
2007-08-22  4:04 ` drepper at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).