Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[analyzer] Track assume call stack to detect fixpoint
Assume functions might recurse (see `reAssume` or `tryRearrange`). During the recursion, the State might not change anymore, that means we reached a fixpoint. In this patch, we avoid infinite recursion of assume calls by checking already visited States on the stack of assume function calls. This patch renders the previous "workaround" solution (D47155) unnecessary. Note that this is not an NFC patch. If we were to limit the maximum stack depth of the assume calls to 1 then would it be equivalent with the previous solution in D47155. Additionally, in D113753, we simplify the symbols right at the beginning of evalBinOpNN. So, a call to `simplifySVal` in `getKnownValue` (added in D51252) is no longer needed. Fixes #55851 Differential Revision: https://reviews.llvm.org/D126560
- Loading branch information
Gabor Marton
committed
Jun 7, 2022
1 parent
a7b154a
commit f66f4d3
Showing
3 changed files
with
27 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters