Fix setBounds not clearing tag (#12)
Ensure tag is cleared if the result is not in bounds
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user