Add a new property that encoding and decoding a memory capability gives the same result. This caught the most recent bug.
This commit is contained in:
@@ -178,4 +178,11 @@ function Bool prop_isInBounds(CapAddr base, CapAddr len, CapAddr addr);
|
||||
return forallCap(base, len, addr, prop);
|
||||
endfunction
|
||||
|
||||
(* noinline *)
|
||||
function Bool prop_fromToMem(CapMem in);
|
||||
CapPipe cp = fromMem(unpack(in));
|
||||
CapMem cm = pack(toMem(cp));
|
||||
return (cm == in);
|
||||
endfunction
|
||||
|
||||
endpackage
|
||||
|
||||
Reference in New Issue
Block a user