Skip to content

Commit

Permalink
Remove an unnecessary assertion from cap_is_in_bounds()
Browse files Browse the repository at this point in the history
Calling this with zero length is fine and works as intended.
  • Loading branch information
arichardson committed Jul 17, 2023
1 parent 105ce4f commit 7787f82
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion target/cheri-common/cheri_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ static inline bool cap_is_sealed_with_reserved_otype(const cap_register_t *c)
static inline bool cap_is_in_bounds(const cap_register_t *c, target_ulong addr,
size_t num_bytes)
{
cheri_debug_assert(num_bytes != 0);
#ifdef TARGET_AARCH64
// Invalid exponent caps are always considered out of bounds.
if (!c->cr_bounds_valid)
Expand Down

0 comments on commit 7787f82

Please sign in to comment.