-
Notifications
You must be signed in to change notification settings - Fork 1.7k
C++: Implement use-after-free and double-free queries using the new IR use-use dataflow #12569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
MathiasVP
merged 24 commits into
github:main
from
andersfugmann:andersfugmann/use_after_free
Apr 17, 2023
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
d65bb3b
C++: Make basic block information available from dataflow nodes.
MathiasVP dfe00ff
C++: Add a flow-after-free library.
MathiasVP cc12e74
C++: Add double-free query.
MathiasVP fb2ec15
C++: Add double-free query documentation.
MathiasVP a8151b4
C++: Add double-free tests.
MathiasVP 17fe5f2
C++: Change the id of the experimental double-free query to not overl…
MathiasVP 725004a
C++: Modernize use-after-free query using dataflow.
MathiasVP 3c88590
C++: Accept test changes for the new use-after-query.
MathiasVP c1960c6
C++: Add double-free change note.
MathiasVP 259d5b6
C++: Add use-after-free change note.
MathiasVP 49cceb2
C++: Fix joins.
MathiasVP ab70f57
C++: More QLDoc.
MathiasVP ba4e3ae
Update cpp/ql/src/Critical/FlowAfterFree.qll
MathiasVP e0aeea0
C++: Fix qhelp for double-free.
MathiasVP d304022
C++: Add QLDoc to 'isExcludeFreePair'.
MathiasVP c76dbeb
C++: Ensure that the 'use-after-free' query is run on 'test_free.cpp'.
MathiasVP 416f8d5
C++: Fix test annotations.
MathiasVP 23a7cd9
C++: Fix missing result and accept test changes.
MathiasVP 40dde93
C++: Fix FP and accept test changes.
MathiasVP 31b71ea
C++: Fix annotations.
MathiasVP 1ac5db3
C++: Fix annotations.
MathiasVP b2d4a82
C++: Fix annotations.
MathiasVP dba46bd
Update cpp/ql/src/Critical/DoubleFree.ql
MathiasVP fa5ed04
Update cpp/ql/src/Critical/DoubleFree.qhelp
MathiasVP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
C++: Make basic block information available from dataflow nodes.
- Loading branch information
commit d65bb3b23242e19800911d8c732ae8ce408f50d8
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that phi nodes are defined to have index -1 in the basic block (is Ssa), but it is unclear to me if this is safe to use for comparison.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The index isn't supposed to be used for comparing dataflow nodes anyway. It's only used to give an ordering on the nodes, and there's no good way to order phi nodes. So using -1 for all the phi nodes in the block is really the most sensible choice