Skip to content

Commit

Permalink
libunwind: Allow untagged pc under benchmark ABI
Browse files Browse the repository at this point in the history
Under the benchmark ABI, when making a function call that never returns, the link register might contain an untagged capability generated by a previous function return (Recall that returning under the benchmark ABI involves clearing the LSB of the address, clearing the tag at the same time).
  • Loading branch information
dpgao committed Jun 12, 2024
1 parent bd8d242 commit 559dbe0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libunwind/src/AddressSpace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ class _LIBUNWIND_HIDDEN LocalAddressSpace {
}
bool isNull() const { return value == nullptr; }
bool isValid() const {
#ifdef __CHERI_PURE_CAPABILITY__
#if defined(__CHERI_PURE_CAPABILITY__) && \
!defined(__ARM_MORELLO_PURECAP_BENCHMARK_ABI)
return __builtin_cheri_tag_get(value);
#else
return !isNull();
Expand Down

0 comments on commit 559dbe0

Please sign in to comment.