Skip to content
Permalink
Browse files

division typecheck bugfix

  • Loading branch information...
scauligi committed Jun 21, 2019
1 parent 721da9b commit ecd5e6d043a9a5b384af7b6b658ebff57d0ae48e
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/sanitycheck.ml
@@ -152,7 +152,15 @@ class sanitychecker post_transform m =
let e1ty = type_of e1 in
let e2ty = type_of e2 in
if not (e1ty =: e2ty) then
raise @@ err p
raise @@ err p;
begin
match op with
| Ast.Divide
| Ast.Modulo ->
if (label_of e1ty).data = Secret then
raise @@ cerr p "secret division";
| _ -> ()
end
| Declassify e ->
let e_bty = type_of e in
if not (bty =: declassify e_bty) then

0 comments on commit ecd5e6d

Please sign in to comment.
You can’t perform that action at this time.