[PATCH] [11/12/13/14 Regression] ABI break in _Hash_node_value_base since GCC 11 [PR 111050]
François Dumont
frs.dumont@gmail.com
Sun Sep 10 13:56:11 GMT 2023
Following confirmation of the fix by TC here is the patch where I'm
simply adding a 'constexpr' on _M_next().
Please let me know this ChangeLog entry is correct. I would prefer this
patch to be assigned to 'TC' with me as co-author but I don't know how
to do such a thing. Unless I need to change my user git identity to do so ?
libstdc++: Add constexpr qualification to _Hash_node::_M_next()
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=1b6f0476837205932613ddb2b3429a55c26c409d
changed _Hash_node_value_base to no longer derive from
_Hash_node_base, which means
that its member functions expect _M_storage to be at a different
offset. So explosions
result if an out-of-line definition is emitted for any of the
member functions (say,
in a non-optimized build) and the resulting object file is then
linked with code built
using older version of GCC/libstdc++.
libstdc++-v3/ChangeLog:
* include/bits/hashtable_policy.h
(_Hash_node_value_base<>::_M_valptr(),
_Hash_node_value_base<>::_M_v())
Add [[__gnu__::__always_inline__]].
(_Hash_node<>::_M_next()): Add constexpr.
Co-authored-by: TC <rs2740@gmail.com>
Ok to commit and backport to GCC 11, 12, 13 branches ?
François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr111050.patch
Type: text/x-patch
Size: 1096 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20230910/f6d7493a/attachment.bin>
More information about the Libstdc++
mailing list