Skip to content

Commit

Permalink
toEC (leakage extraction): fix for loop bound swap
Browse files Browse the repository at this point in the history
Fixes #858
  • Loading branch information
cassiersg committed Jul 10, 2024
1 parent 5a95a5f commit c5289b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/src/toEC.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,8 @@ module Leak = struct
(pp_cmd pd asmOp env) (c2@c1) pp_leak e

| Cfor(i, (d,e1,e2), c) ->
(* decreasing for loops have bounds swaped *)
let e1, e2 = if d = UpTo then e1, e2 else e2, e1 in
pp_leaks_for pd env fmt e1 e2;
let aux, env1 =
if for_safety env then
Expand Down

0 comments on commit c5289b7

Please sign in to comment.