From 5b5b58e7a5b67419371192905eb46b7d74a46102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 28 Feb 2023 10:08:09 +0100 Subject: [PATCH] [server] Catches SizeOfError exception when calling Cil.bitsSizeOf. --- src/plugins/server/kernel_ast.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/server/kernel_ast.ml b/src/plugins/server/kernel_ast.ml index 41e7fc764fb..873e9e181d0 100644 --- a/src/plugins/server/kernel_ast.ml +++ b/src/plugins/server/kernel_ast.ml @@ -766,7 +766,10 @@ let () = Information.register | PGlobal (GEnumTagDecl(ei,_) | GEnumTag(ei,_)) -> TEnum(ei,[]) | _ -> raise Not_found in - let bits = Cil.bitsSizeOf typ in + let bits = + try Cil.bitsSizeOf typ + with Cil.SizeOfError _ -> raise Not_found + in let bytes = bits / 8 in let rbits = bits mod 8 in if rbits > 0 then -- GitLab