public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/109054] New: _Unwind_GetLanguageSpecificData should have protected visibility
@ 2023-03-07 15:39 woodard at redhat dot com
  2023-03-07 15:53 ` [Bug libgcc/109054] " jakub at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: woodard at redhat dot com @ 2023-03-07 15:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109054

            Bug ID: 109054
           Summary: _Unwind_GetLanguageSpecificData should have protected
                    visibility
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: woodard at redhat dot com
  Target Milestone: ---

When you look at libgcc_s.so's implementation of
_Unwind_GetLanguageSpecificData

$ eu-readelf -s /lib64/libgcc_s.so.1 | grep _Unwind_GetLanguageSpecificData
   67: 0000000000014d20     12 FUNC    GLOBAL DEFAULT       14
_Unwind_GetLanguageSpecificData@@GCC_3.0

It has default visibility. Yes I know that a library should not export
functions that are _[A-Z] because those are reserved for system libraries. ref:
http://eel.is/c++draft/lex.name#3.1 

However, libunwind does and this led to a very hard to track down problem when
they had linked an application a particular way. What happened was libgcc_s.so
picked up libunwind's implementation of _Unwind_GetLanguageSpecificData this
ultimately caused libgcc_s.so to not be able to find the LSDA of an object
throwing an exception. This made it so that there was no way to catch the
exception and therefore the application aborted. The application was not even
aware of the fact that they were using libunwind becasue it came in as a
dependency of libzmq.

I can't think of a good reason why libgcc_s.so should allow another library to
replace its version of _Unwind_GetLanguageSpecificData and so it seems to me
that the symbol's visibility should be made protected rather than having the
default visibility. 

Other related bugs are: https://bugzilla.redhat.com/show_bug.cgi?id=2175966

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

end of thread, other threads:[~2023-03-07 17:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07 15:39 [Bug libgcc/109054] New: _Unwind_GetLanguageSpecificData should have protected visibility woodard at redhat dot com
2023-03-07 15:53 ` [Bug libgcc/109054] " jakub at gcc dot gnu.org
2023-03-07 16:16 ` jakub at gcc dot gnu.org
2023-03-07 17:42 ` woodard at redhat dot com
2023-03-07 17:49 ` jakub at gcc dot gnu.org
2023-03-07 17:58 ` woodard 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).