]> git.ipfire.org Git - thirdparty/gcc.git/commit
preserve base pointer for __deregister_frame [PR110956]
authorThomas Neumann <thomas.neumann@in.tum.de>
Fri, 11 Aug 2023 15:20:27 +0000 (09:20 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Fri, 11 Aug 2023 15:20:27 +0000 (09:20 -0600)
commitc46bded78f3733ad1312d141ebf1ae541032a48b
treeabbd689d0187da1d4ce4057ff0e854dd2792910a
parentef96754d8aa6f21e3a76c3fe26fc0203fb703837
preserve base pointer for __deregister_frame [PR110956]

Original bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110956
Rainer Orth successfully tested the patch on Solaris with a full bootstrap.

Some uncommon unwinding table encodings need to access the base pointer
for address computations. We do not have that information in calls to
__deregister_frame_info_bases, and previously simply used nullptr as
base pointer. That is usually fine, but for some Solaris i386 shared
libraries that results in wrong address computations.

To fix this problem we now associate the unwinding object with
the table pointer itself, which is always known, in addition to
the PC range. When deregistering a frame, we first locate the object
using the table pointer, and then use the base pointer stored within
the object to compute the PC range.

libgcc/ChangeLog:
PR libgcc/110956
* unwind-dw2-fde.c: Associate object with address of unwinding
table.
libgcc/unwind-dw2-fde.c