Simplest: catch inconsistent subroutine in of_prog

This commit is contained in:
Théophile Bastian 2018-11-16 19:11:52 +01:00
parent b4043249f9
commit 7ffc33d7a8

View file

@ -407,7 +407,13 @@ let of_prog prog : cfa_changes =
(try
let res = cleanup_fde @@ process_sub sub in
StrMap.add (BStd.Sub.name sub) res accu
with InvalidSub -> accu)
with
| InvalidSub -> accu
| Inconsistent tid ->
Format.eprintf "Inconsistent TId %a in subroutine %s, skipping.@."
BStd.Tid.pp tid (BStd.Sub.name sub);
accu
)
in
let subroutines = BStd.Term.enum BStd.sub_t prog in
BStd.Seq.fold subroutines