From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0A7C93858C20; Tue, 7 Mar 2023 15:39:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A7C93858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678203593; bh=llRMZiRiq21f1r35AREnkFdjxKcdwdODDiGYj0/PFfM=; h=From:To:Subject:Date:From; b=d7ufo75+BUENnJr3yEd2p52ESCNSGklo3CZXAUylpg8lQi5gTX22Xm6rV9u4JP2k1 cc/tQprQnDh+cNR8xOPSB9lkLKDTAf4U+ulGrHnBuHld6qaSRvaD+EKL03oAlu2a4U g59YUzC9TshqdeD41W/eCBgN5y/Q+u1LnD6XRCgw= From: "woodard at redhat dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgcc X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: woodard at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109054 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=20 However, libunwind does and this led to a very hard to track down problem w= hen 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 ev= en 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.=20 Other related bugs are: https://bugzilla.redhat.com/show_bug.cgi?id=3D21759= 66=