Skip to content

Commit

Permalink
[pulse][join] do not treat calls with an over-approx result as unknown
Browse files Browse the repository at this point in the history
Summary:
When running in over-approximation mode, a call's effect can be purely
in the over-approx part of the state and the previous heuristic would
think we failed to apply the call in that case and scramble the state
instead.

Reviewed By: hajduakos

Differential Revision:
D67276580

Privacy Context Container: L1208441

fbshipit-source-id: c0773b20c35547e2decdcd1094ef7dbd503bbd88
  • Loading branch information
jvillard authored and facebook-github-bot committed Dec 17, 2024
1 parent 141eb33 commit 92b9a7d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion infer/src/pulse/PulseCallOperations.ml
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,9 @@ let call ?disjunct_limit ({InterproceduralAnalysis.analyze_dependency} as analys
iter_call ~max_iteration ~nth_iteration:0 ~is_pulse_specialization_limit_not_reached
already_given summary.PulseSummary.main astate
in
let has_continue_program = has_continue_program res in
let has_continue_program =
has_continue_program res || not (NonDisjDomain.astate_is_bottom non_disj)
in
if has_continue_program then GlobalForStats.node_is_not_stuck () ;
let res, non_disj =
if
Expand Down
2 changes: 2 additions & 0 deletions infer/src/pulse/PulseNonDisjunctiveDomain.ml
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,8 @@ let join_to_astate astate non_disj =
{non_disj with astate= OverApproxDomain.join non_disj.astate astate}


let astate_is_bottom {astate} = OverApproxDomain.is_bottom astate

type summary =
{ transitive_info: InterDom.t
; has_dropped_disjuncts: AbstractDomain.BooleanOr.t
Expand Down
2 changes: 2 additions & 0 deletions infer/src/pulse/PulseNonDisjunctiveDomain.mli
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ val exec :
val join_to_astate :
(AbductiveDomain.t * PathContext.t) AbstractDomain.Types.bottom_lifted -> t -> t

val astate_is_bottom : t -> bool

val for_disjunct_exec_instr : t -> t

val pp_with_kind : Pp.print_kind -> F.formatter -> t -> unit
Expand Down

0 comments on commit 92b9a7d

Please sign in to comment.