Merge "Point to the riscv64 psABI frame pointer documentation." into main am: c983dbf0b2 am: 948133436e

Original change: https://android-review.googlesource.com/c/platform/bionic/+/2707397

Change-Id: Iaa4bda37a83cffead83f4d8d0477e4a6a2412bea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Elliott Hughes 2023-08-16 16:32:52 +00:00 committed by Automerger Merge Worker
commit a52ed9c983

View file

@ -74,7 +74,9 @@ __attribute__((no_sanitize("address", "hwaddress"))) size_t android_unsafe_frame
while (1) {
#if defined(__riscv)
// Frame addresses seem to have been implemented incorrectly for RISC-V.
// See https://reviews.llvm.org/D87579.
// See https://reviews.llvm.org/D87579. We did at least manage to get this
// documented in the RISC-V psABI though:
// https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#frame-pointer-convention
auto* frame = reinterpret_cast<frame_record*>(begin - 16);
#else
auto* frame = reinterpret_cast<frame_record*>(begin);