From 93c2d7a4f4b64088f8bd42ebe64ac53e30ccbeb7 Mon Sep 17 00:00:00 2001 From: Daiva Naudziuniene Date: Thu, 24 May 2018 03:26:33 -0700 Subject: [PATCH] [uninit] Have both pointer and its dereference as uninitialized Summary: We want both pointer and pointer dereference to be uninitialised at the beginning. Forgot to add the expression of type pointer when updating the analysis from access paths to access expressions. Reviewed By: ddino Differential Revision: D8117011 fbshipit-source-id: 534f7ef --- infer/src/checkers/uninit.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infer/src/checkers/uninit.ml b/infer/src/checkers/uninit.ml index 8522941c5..0b45ae0d6 100644 --- a/infer/src/checkers/uninit.ml +++ b/infer/src/checkers/uninit.ml @@ -379,7 +379,7 @@ let get_locals cfg tenv pdesc = | Typ.Tarray {elt} -> AccessExpression.ArrayOffset (base_access_expr, elt, []) :: acc | Typ.Tptr _ -> - AccessExpression.Dereference base_access_expr :: acc + base_access_expr :: AccessExpression.Dereference base_access_expr :: acc | _ -> base_access_expr :: acc ) ~init:[] (Procdesc.get_locals cfg)