This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/13344] Marking all functions which don't have callbacks with the leaf attribute breaks pthread applications.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]