From 860f28734063628f5582be91c7429b14f0922917 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Mon, 26 Dec 2016 18:09:57 +0100 Subject: Avoid exception catch-all "try ...; true with _ -> false" is dangerous if "..." raises unexpected exceptions such as Out_of_memory or Stack_overflow. --- cparser/Elab.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cparser/Elab.ml') diff --git a/cparser/Elab.ml b/cparser/Elab.ml index 7b2c14e9..845fc210 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -1184,7 +1184,7 @@ module I = struct let mem f id = try ignore(f env (id,name)); true - with _ -> false in + with Env.Error _ -> false in match ty with | TStruct (id,_) -> mem Env.find_struct_member id -- cgit