diff --git a/src/framework/cfgTools.ml b/src/framework/cfgTools.ml index 72c646a6af..74b73b44e0 100644 --- a/src/framework/cfgTools.ml +++ b/src/framework/cfgTools.ml @@ -622,7 +622,8 @@ let getCFG (file: file) : cfg * cfg = | Function fd -> fd | FunctionEntry fd -> fd in - (fun n -> H.find_default (fst @@ FH.find cfgs (find_fundec n)) n []), (fun n -> H.find_default (snd @@ FH.find cfgs (find_fundec n)) n []) + (* TODO: better Not_found handling *) + (fun n -> try H.find_default (fst @@ FH.find cfgs (find_fundec n)) n [] with Not_found -> []), (fun n -> try H.find_default (snd @@ FH.find cfgs (find_fundec n)) n [] with Not_found -> []) let iter_fd_edges (module Cfg : CfgBackward) fd = diff --git a/src/incremental/compareCIL.ml b/src/incremental/compareCIL.ml index 713ea62660..1c7de27f56 100644 --- a/src/incremental/compareCIL.ml +++ b/src/incremental/compareCIL.ml @@ -200,6 +200,7 @@ let compareCilFiles ?(eq=eq_glob) (oldAST: file) (newAST: file) = | ForceReanalyze f -> changes.exclude_from_rel_destab <- VarinfoSet.add f.svar changes.exclude_from_rel_destab; append_to_changed ~unchangedHeader:false; + (* TODO: does this Not_found only concern old_global or also something in eq? *) with Not_found -> changes.removed <- current_global::changes.removed (* Global could not be found in old map -> added *) in