Merged
Conversation
…lpointer-dereference
…lpointer-dereference
…into nullpointer-dereference
dbg.debug now always true in regression tests
Contributor
Author
Created a new regression test for that! |
Contributor
Author
@sim642 We had a discussion with the tutors (@michael-schwarz and @jerhard) and came to the conclusion that this would be out of scope for the PR. Hope that's ok for you! |
jerhard
reviewed
Jul 5, 2021
also renames Warning -> WarningWithCertainty and WarnType -> Warning
also remove the array type because arrayoob is under UB
also uses concatenation instead of redundant sprintf
and replace unused parameters with `_`
also adds optional location to warn_each
this eliminates the need to specify the regexes separately in update_suite.rb later it would probably be nice if the categories were parsed and checked there also changes formatting of the warning tags
also adds optional msg argument and removes string params from unknown and debug
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #199
In this PR we add detection for nullpointer dereference and add regression tests for this.
We differentiate between may and must, the detection happens inside of the base analysis and it is under the flag
dbg.warn.behavior.The detection happens inside of
eval_lv.The must warning gets printed when there exists at least one path and context where the nullpointer dereferenciation must happen when reaching the program point it in the corresponding context and with a value described by the predecessor.
The may warning gets printed when we are not sure that the pointer is not null.