diff --git a/CHERICC_Fat.bsv b/CHERICC_Fat.bsv index 451ce38..ed6b2e4 100644 --- a/CHERICC_Fat.bsv +++ b/CHERICC_Fat.bsv @@ -668,6 +668,9 @@ function SetBoundsReturn#(CapFat, CapAddrW) setBoundsFat(CapFat cap, Address len Bool resultInBounds = newBaseInBounds && newTopInBounds && !addressWrap; + // Nullify the capability if the result is not in bounds + if (!resultInBounds) ret.isCapability = False; + // Return derived capability return SetBoundsReturn { cap: ret , exact: exact