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 authored Jun 12, 2024
1 parent 578ea4f commit c6fc438
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libunwind/src/AddressSpace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ 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 c6fc438

Please sign in to comment.