From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BF4D93847814; Tue, 29 Jun 2021 15:28:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF4D93847814 From: "woodard at redhat dot com" To: libabigail@sourceware.org Subject: [Bug default/28025] New: exceptions are not checked for ABI compatibility. Date: Tue, 29 Jun 2021 15:28:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: woodard at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dodji at redhat dot com 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 cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 15:28:18 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28025 Bug ID: 28025 Summary: exceptions are not checked for ABI compatibility. Product: libabigail Version: unspecified Status: NEW Severity: enhancement Priority: P2 Component: default Assignee: dodji at redhat dot com Reporter: woodard at redhat dot com CC: libabigail at sourceware dot org Target Milestone: --- Libabigail doesn't inspect types which are thrown for compatibility this can lead to ABI errors. The reason for this appears to be that it believes that= the types are private and therefore not part of the exported ABI.=20 Here is an example that shows that they are. $ for i in rtti-exception.[hC] use-rtti-excep.C;do echo --- $i;cat $i;done --- rtti-exception.C #include #include "rtti-exception.h" extern int do_something( int num){ std::cout << "did something\n"; throw ex(num); } --- rtti-exception.h #ifdef VER_1 class ex { public: int num; ex( int n):num(n){} }; #endif #ifdef VER_2 class ex { float num; public: ex( int n):num(n){} }; #endif int do_something( int num); --- use-rtti-excep.C #define VER_1 #include #include "rtti-exception.h" int main( int argc, char **argv){ try{ do_something( 3); } catch( ex &excep){ std::cout << "caught " << excep.num << std::endl; } return 0; } $ abidiff librttiexcep_v1.so librttiexcep_v2.so ;echo $? 0 $ abidiff rtti-v1.o rtti-v2.o ;echo $? 0 $ export SWAP_LIB_FILENAME=3Dlibswapfile $ LD_LIBRARY_PATH=3D. ./use-rtti-excep did something caught 3 $ LD_AUDIT=3D./swap-libs-audit.so LD_LIBRARY_PATH=3D. ./use-rtti-excep=20 did something caught 1077936128 It is believed that types that there is enough information in the LSDA of t= he object doing the throwing to be able to identify the type being thrown. It = can then be added to the list of types which must be compared when comparing libraries. --=20 You are receiving this mail because: You are on the CC list for the bug.=