From 3fe1cbb6ec87a31768a0e16e93e22adb5d75c4db Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Sun, 22 May 2016 13:47:30 -0700 Subject: [PATCH] Fix bug in sym_eval Summary: Fix apparent bug in sym_eval, where struct fields could be reversed. Reviewed By: cristianoc Differential Revision: D3333035 fbshipit-source-id: 4ccc859 --- infer/src/backend/prop.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infer/src/backend/prop.ml b/infer/src/backend/prop.ml index f759869bb..8537dd37d 100644 --- a/infer/src/backend/prop.ml +++ b/infer/src/backend/prop.ml @@ -608,7 +608,7 @@ let sym_eval abs e = let size' = Sil.BinOp(Sil.PlusA, size, num_elem) in let ltfa' = (fname, Sil.Tarray(typ, size'), Sil.item_annotation_empty) :: ltfa in let struct_typ' = - { struct_typ with Sil.instance_fields = ltfa' } in + { struct_typ with Sil.instance_fields = IList.rev ltfa' } in Sil.Sizeof (Sil.Tstruct struct_typ', st) | _ -> Sil.BinOp(Sil.PlusA, e1', e2')) | Sil.BinOp (Sil.PlusA as oplus, e1, e2)