From 7ffc33d7a8bb803cba3929f95653ac52b90b30ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Fri, 16 Nov 2018 19:11:52 +0100 Subject: [PATCH] Simplest: catch inconsistent subroutine in of_prog --- DwarfSynth/Simplest.ml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/DwarfSynth/Simplest.ml b/DwarfSynth/Simplest.ml index af0db02..471972b 100644 --- a/DwarfSynth/Simplest.ml +++ b/DwarfSynth/Simplest.ml @@ -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