|
|
@ -538,15 +538,11 @@ let report_context_leaks pname sigma tenv =
|
|
|
|
List.iter
|
|
|
|
List.iter
|
|
|
|
~f:(fun (context_exp, name) ->
|
|
|
|
~f:(fun (context_exp, name) ->
|
|
|
|
if Exp.Set.mem context_exp reachable_exps then
|
|
|
|
if Exp.Set.mem context_exp reachable_exps then
|
|
|
|
let leak_path =
|
|
|
|
|
|
|
|
match get_fld_typ_path_opt fld_exps context_exp reachable_hpreds with
|
|
|
|
match get_fld_typ_path_opt fld_exps context_exp reachable_hpreds with
|
|
|
|
| Some path
|
|
|
|
|
|
|
|
-> path
|
|
|
|
|
|
|
|
| None
|
|
|
|
| None
|
|
|
|
-> assert false
|
|
|
|
-> () (* TODO (T21871205): the underlying issue still need to be fixed *)
|
|
|
|
(* a path must exist in order for a leak to be reported *)
|
|
|
|
| Some leak_path
|
|
|
|
in
|
|
|
|
-> let err_desc =
|
|
|
|
let err_desc =
|
|
|
|
|
|
|
|
Errdesc.explain_context_leak pname (Typ.mk (Tstruct name)) fld_name leak_path
|
|
|
|
Errdesc.explain_context_leak pname (Typ.mk (Tstruct name)) fld_name leak_path
|
|
|
|
in
|
|
|
|
in
|
|
|
|
let exn = Exceptions.Context_leak (err_desc, __POS__) in
|
|
|
|
let exn = Exceptions.Context_leak (err_desc, __POS__) in
|
|
|
|