Joe McDonnell has submitted this change and it was merged. ( 
https://gerrit.cloudera.org/25473 )

Change subject: IMPALA-15824: Switch to latest Abseil LTS to fix ARM stacktrace 
bug
......................................................................

IMPALA-15824: Switch to latest Abseil LTS to fix ARM stacktrace bug

Google TCMalloc uses Abseil to take a stacktrace when
it samples an allocation. On ARM tests, we have been seeing
a crash in this stacktrace logic. Abseil was not properly
checking the bounds of the stack on ARM, and this was fixed
in 
https://github.com/abseil/abseil-cpp/commit/d804847f371afde0c2881df60aa87aa7837f44c4
This is present in Abseil's 20260817.0 LTS release.

When debugging this, Claude suggested an additional fix for
undefined behavior in the the ARM stacktrace's ComputeStackFrameSize().
It was subtracting the frame pointers as pointers. Since frame
pointers read from a corrupt or foreign frame can be an arbitrary
value, the difference may not fit in ptrdiff_t, which makes the
subtraction undefined behavior. GCC uses this to assume the result
is non-negative and compiles the "frame_size > max_size" check
in NextStackFrame() as a signed compare. A huge difference then
wraps negative and passes the check. This switches to using
uintptr_t for the comparison and subtraction, which is well-defined
for any pair of addresses and gives an unsigned compare.

The LTS bump alone fixes the crash, and the extra patch is
purely for completeness.

Testing:
 - Looped the end to end tests for 20 hours on Redhat 9 ARM for
   both debug and release exhaustive with Google TCMalloc and
   did not see a crash

Change-Id: Ia04792279ebaed11334ca9065619527529b9ba8a
Reviewed-on: https://gerrit.cloudera.org/25473
Reviewed-by: Michael Smith <[email protected]>
Tested-by: Joe McDonnell <[email protected]>
---
M buildall.sh
A 
source/abseil-cpp/abseil-cpp-20260817.0-patches/0001-Avoid-pointer-subtraction-in-AArch64-unwinder-frame-.patch
2 files changed, 63 insertions(+), 4 deletions(-)

Approvals:
  Michael Smith: Looks good to me, approved
  Joe McDonnell: Verified

--
To view, visit https://gerrit.cloudera.org/25473
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: native-toolchain
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia04792279ebaed11334ca9065619527529b9ba8a
Gerrit-Change-Number: 25473
Gerrit-PatchSet: 3
Gerrit-Owner: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>

Reply via email to