public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "woodard at redhat dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcc/109054] New: _Unwind_GetLanguageSpecificData should have protected visibility Date: Tue, 07 Mar 2023 15:39:52 +0000 [thread overview] Message-ID: <bug-109054-4@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2023-03-07 15:39 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-07 15:39 woodard at redhat dot com [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-109054-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).