From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EA6703858C31; Tue, 12 Sep 2023 15:54:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EA6703858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694534078; bh=+PxhK6pwpTllk7jd20tObxiwWE9QlTA/2kwVZMA/H7Q=; h=From:To:Subject:Date:In-Reply-To:References:From; b=oWLypqWbjeLnwRrnBJqubYCH2icYlbt/ElsLdGGob5E91YbUhl1uAvO2EP3klFV3q fqFogbQ8Fz5EO47LP27k7tRtIApiBzEZOkjk0ffPcGXIbfZ9NHC1lcfndnPhxnCYaW 6esvTs93Yn6tSIwavfT9m8ccpvMHuBbWuVx5zzPQ= From: "john at drouhard dot dev" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/111050] [11/12/13/14 Regression] ABI break in _Hash_node_value_base since GCC 11 Date: Tue, 12 Sep 2023 15:54:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ABI X-Bugzilla-Severity: normal X-Bugzilla-Who: john at drouhard dot dev X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: fdumont at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: 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=3D111050 John Drouhard changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |john at drouhard dot dev --- Comment #10 from John Drouhard --- (In reply to frs.dumont from comment #9) > To be honest before that report I thought that preserving abi was just a= =20 > matter of preserving memory layout of types. I had no idea that member=20 > methods mattered ! (I was the original reporter of this to TC) I think the specific issue here is that the member function `_M_valptr()` returns the address of the storage data member, and that _function_ is used= in a construct call elsewhere to point to the address where a new object shoul= d be placed. It returns the address based on the offset from the beginning of the object which changed when the base class (which had its own data members) w= as removed. So, if the function isn't inlined, the symbol that's actually loaded by the dynamic linker during runtime will return a potentially bogus address for t= hat data member if the definition of that function came from a library compiled with the other version.=