This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/11670] Variables defined in pthread_cleanup_push() macro may be optimised away which breaks __sigsetjmp
- From: "christian dot eggers at kathrein dot de" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 7 Jun 2010 12:05:14 -0000
- Subject: [Bug nptl/11670] Variables defined in pthread_cleanup_push() macro may be optimised away which breaks __sigsetjmp
- References: <20100605071837.11670.ceggers@gmx.de>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- 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.