From d179c4ccb5718679fdbce556d26c1076af596d8e Mon Sep 17 00:00:00 2001 From: Kyriakos Nikolaos Gkorogiannis Date: Fri, 6 Oct 2017 16:04:31 -0700 Subject: [PATCH] [threadsafety] Address issue arising from actuals and formals having different lengths at call sites (this time for ObjC). Reviewed By: jberdine Differential Revision: D6000682 fbshipit-source-id: 27f7ab7 --- infer/src/checkers/ThreadSafety.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infer/src/checkers/ThreadSafety.ml b/infer/src/checkers/ThreadSafety.ml index 0f27f0fab..40d285699 100644 --- a/infer/src/checkers/ThreadSafety.ml +++ b/infer/src/checkers/ThreadSafety.ml @@ -580,8 +580,9 @@ module TransferFunctions (CFG : ProcCfg.S) = struct in let open Domain in let formals, _ = FormalMap.make pdesc |> FormalMap.get_formals_indexes |> List.unzip in + let n = min (List.length formals) (List.length actuals) in let fmls_actls = - List.zip_exn formals (List.take actuals (List.length formals)) + List.zip_exn (List.take formals n) (List.take actuals n) |> List.filter_map ~f:(fun (fml, act) -> match get_access_path act with Some path -> Some (fml, path) | _ -> None ) in