forked from facebook/infer
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[uninit] Degrade eval mode when unknown effect is found
Summary: When a variable is given to an unknown function, all reachable addresses from the variable are havoc'ed with being set as having the "unknown effect" attribute. The problem is that when the variable had not enough fields in the abstract memory, e.g. given as a parameter, it missed the attribue setting. ``` foo (arg) { unknown(arg); _ = arg.f; } ``` Although `arg.f` may be initialized by `unknown`, the summary of foo included "`arg.f` must be initialized" before calling `foo`, because it did not havoc `arg.f` when `unknown` was called. To avoid the problem, when evaluating `arg.f`, this diff checks whether `arg` has "unknown effect" or not, and if so, assumes `arg.f` has been initialized. Reviewed By: jvillard Differential Revision: D55380943 fbshipit-source-id: 4fcf07434db75297acbd110df9c0972f857e35c6
- Loading branch information
1 parent
dd3317b
commit afc0f30
Showing
6 changed files
with
72 additions
and
4 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
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