This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/13344] Marking all functions which don't have callbacks with the leaf attribute breaks pthread applications.
- From: "jakub at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Tue, 25 Oct 2011 20:38:30 +0000
- Subject: [Bug nptl/13344] Marking all functions which don't have callbacks with the leaf attribute breaks pthread applications.
- Auto-submitted: auto-generated
- References: <bug-13344-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13344
--- Comment #1 from Jakub Jelinek <jakub at redhat dot com> 2011-10-25 20:38:30 UTC ---
I think the leaf attribute in gcc is currently primarily used by ipa-reference
to find out what variables are supposed not to be read resp. written during the
call to that function (with leaf attribute all static vars in the current
translation unit are in that set if the leaf function is defined in some other
compilation unit) and for checking whether labels can be reached by non-local
goto. While the synchronization primitives don't call any callbacks, from this
POV it is undesirable to treat them that way, they need to be considered as
full barriers. I think the GCC documentation of leaf attribute should be
improved and the pthread.h/sem.h functions that are supposed to work as memory
synchronization points should use __THROWNL or similar macro which would be the
old __THROW, without leaf attribute in it.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.