-
Notifications
You must be signed in to change notification settings - Fork 78
[checked-c-convert] Minor fixes to the checked-c-convert #679
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
Merged
Changes from all commits
Commits
Show all changes
185 commits
Select commit
Hold shift + click to select a range
f399ffb
Update DeclStmt to Stmt inside DAndReplace
rchyena f613ef1
Refectoring Utils and ConstraintVariables
Machiry 99bdeea
Minor edits
Machiry 837b310
Finishing up refactoring
Machiry 60ccc70
initial template
Machiry 67dee76
Initial prototype
Machiry 28242d3
Minor fixes
Machiry cbc2926
Minor refactoring and fixed unit tests
Machiry 8088147
Fixing minor
Machiry 0624728
Modified lattice
Machiry 9b83b6c
Fixing the void * issue
Machiry 73c979a
Clean up and refactoring
Machiry 2059105
Adding NT Array contraint type
Machiry a1d19b8
Finalizing NT_array detection
Machiry 59007a4
Minor refactoring
Machiry 199169c
Adidng unit tests
Machiry 6d320e4
Finalizing NT array implementation
Machiry 7549b88
Minor fixes
Machiry 53d89a5
Merge branch 'master' into debuggingNT
Machiry f0b4186
Merge pull request #2 from Machiry/debuggingNT
Machiry 4a9ddb3
Refactoring
Machiry 5fe6109
Minor fix
Machiry 58625d3
WIP/getVariable
Machiry 1a6a981
WIP/Fixed constraint generation of CallExpression
Machiry 4b564c0
Fixing Adding equality constraints
Machiry ae77493
Fixing local assignement'
Machiry 7303dc2
Refactored Rewriter
Machiry a216d16
Minor fixes
Machiry 74ad2ce
Fix: Never store information based on AST objects
Machiry feed080
Adding return type handling for itypes
Machiry bf51aaf
Minor fixes
Machiry 647daf9
Efficient constraint propagation: check before we propogatte based on…
Machiry f3eddb7
Avoid getting inscope variables for external functions:
Machiry cad93b9
Minor fir for handling function pointers
Machiry 4f997df
Handling passing of functions as variables (for function pointers)
Machiry ad987a1
Fixing handling of compiler args
Machiry d0c9c02
Removing unnecessary debug output
Machiry 04fc0ca
Minor
Machiry dbc77ba
Ensuring function declaration to be used for all CallExpressions and …
Machiry c897a98
Adding flag to control the merging of types from multiple declarations
Machiry b5329c1
Added functionality tests
Machiry cfec0d9
Added readme for functionality tests
Machiry 6fd0082
Fixed the addition of storage qualifiers (i.e., static and extern)
Machiry 683a5ec
Added to json methods
Machiry 057d8c8
Adding dump to json functionality
Machiry cfa3405
Mark expected state after PRs are accepted.
rchyena ee375ab
Avoid Rewriting function return type, if it was handled by cast rewri…
Machiry bb1891c
Using absolute paths for files - this is needed to consistently displ…
Machiry 4234c36
Handling NULL assignment, fixing rewriter, fixing duplicate constrain…
Machiry 2d007eb
Adding base_dir argument to be passed to the tool
Machiry f7f739a
Fixing script to produce valid checked-c-convert commands
Machiry 0746f25
Fixing minor regression
Machiry cfada81
Ensuring that we do not make an itype constraint variable to be WILD
Machiry 48afac8
Small and cute constraint debugger
Machiry 8b6a637
Flag to enable handling of varargs
Machiry 72bbeb6
Fixing missing * in the return type during itype
Machiry dc3b085
Mark expected state after PRs are accepted.
rchyena 9004cc1
Ignoring varargs and handling of itypes, Huge Improvement (Ptr: 27%, …
Machiry 59bf5a9
Removing unused variables
Machiry fa90953
Adding correct type
Machiry e925d78
Adding correct NT array type
Machiry 77994f5
Marks expected state after 'major_refactor' PRs are accepted.
rchyena b7ad028
Fixing space issue with tests
Machiry 1c0a3b0
Fixing correct handling of function arguments
Machiry f298796
[FIXING TESTS] Fixing an invalid cast
Machiry 683e9da
[FIXING TESTS] Handling of function pointers
Machiry aaa9993
[FIXING TESTS]: Added function subtyping
Machiry 8eb818e
[FIXING TESTS] Finishing cleaning up
Machiry af5f5e5
initial template
Machiry 1520428
Initial prototype
Machiry 0736b10
Minor fixes
Machiry 7c437a6
Fixing minor
Machiry 2779086
Adding NT Array contraint type
Machiry 77ae4e1
Finalizing NT_array detection
Machiry 13b295d
Minor refactoring
Machiry e4be104
Adidng unit tests
Machiry bd4f8bf
Fixing the void * issue
Machiry 3e00328
Minor fixes
Machiry 4c2b7da
Minor refactoring and fixed unit tests
Machiry 77dab59
Modified lattice
Machiry 112e923
Clean up and refactoring
Machiry c4cff69
Finalizing NT array implementation
Machiry 8a66b4b
Obsolete the other NT_array detector.
rchyena 30f7159
Refactoring
Machiry 94144ab
Added to json methods
Machiry 490d377
Minor fix
Machiry 1d037fb
Adding dump to json functionality
Machiry fc6740b
WIP/getVariable
Machiry bb86826
WIP/Fixed constraint generation of CallExpression
Machiry ab17351
Fixing Adding equality constraints
Machiry 770cdd8
Fixing local assignement'
Machiry 799a7d0
Refactored Rewriter
Machiry 44bf8a4
Minor fixes
Machiry b6e7256
Fix: Never store information based on AST objects
Machiry 9c2239e
Adding return type handling for itypes
Machiry 37282f0
Adding flag to control the merging of types from multiple declarations
Machiry 10d3e51
Minor fixes
Machiry 79456c1
Efficient constraint propagation: check before we propogatte based on…
Machiry 42ba45d
Avoid getting inscope variables for external functions:
Machiry 533c39e
Added functionality tests
Machiry f182f83
Added readme for functionality tests
Machiry fe46a6d
Minor fir for handling function pointers
Machiry a868efb
Fixed the addition of storage qualifiers (i.e., static and extern)
Machiry f1479fe
Handling passing of functions as variables (for function pointers)
Machiry 18636a2
Fixing handling of compiler args
Machiry 6e6c3c4
Minor
Machiry d597b85
Removing unnecessary debug output
Machiry 6c1b417
Merge branch 'major_refactor' of github.com:plum-umd/checkedc-clang i…
Machiry d2a7eb5
Ensuring function declaration to be used for all CallExpressions and …
Machiry a588f7c
Merge branch 'major_refactor' of github.com:plum-umd/checkedc-clang i…
Machiry ba8d103
Avoid Rewriting function return type, if it was handled by cast rewri…
Machiry d07a6e2
Using absolute paths for files - this is needed to consistently displ…
Machiry 3661785
Handling NULL assignment, fixing rewriter, fixing duplicate constrain…
Machiry 22e5d95
Adding base_dir argument to be passed to the tool
Machiry 9d51b28
Fixing script to produce valid checked-c-convert commands
Machiry ed3b563
Fixing minor regression
Machiry 171f383
Ensuring that we do not make an itype constraint variable to be WILD
Machiry d5b3402
Small and cute constraint debugger
Machiry 86c61b1
Flag to enable handling of varargs
Machiry dc99e92
Ignoring varargs and handling of itypes, Huge Improvement (Ptr: 27%, …
Machiry 32a1b39
Removing unused variables
Machiry fd7408a
Fixing missing * in the return type during itype
Machiry c30d661
Adding correct type
Machiry be80784
Adding correct NT array type
Machiry 8809547
Minor refactoring
Machiry 36a28cf
Fixing functionality tests
Machiry 01eef26
Fixing space issue with tests
Machiry 740e746
Fixing correct handling of function arguments
Machiry 7fd6eaa
[FIXING TESTS] Fixing an invalid cast
Machiry b1b1748
[FIXING TESTS] Handling of function pointers
Machiry 6346c41
[FIXING TESTS]: Added function subtyping
Machiry 8d23d59
[FIXING TESTS] Finishing cleaning up
Machiry 083f79c
Minor refactoring
Machiry 89eacb1
Fixing functionality tests
Machiry f438b71
Merge PR #642 into dev to bring it up to date.
rchyena 3b960d9
Fixing var args, Fixing issue: https://github.com/plum-umd/checkedc-c…
Machiry 03002e5
Fixing issue: https://github.com/plum-umd/checkedc-clang/issues/3, Ad…
Machiry f0d2866
Minor fix
Machiry 8d08f4b
Minor fix
Machiry 5b6826e
Minor fix
Machiry 76b2cda
Fix for inconsistent function signature issue
Machiry 6bdcacd
Fix for the issue: https://github.com/plum-umd/checkedc-clang/issues/3
Machiry a8e9dc4
Fixing the allocator issue, https://github.com/plum-umd/checkedc-clan…
Machiry 7a3e468
Creating Nt_array_ptr constraint for constant strings
Machiry 34650b9
Fixing issue when the return value is WILD inside the function
Machiry 4d1c277
Fixing strlen test
Machiry c86e647
Fixing strlen test
Machiry b6c1b74
More safe handling of WILD types in function subtying
Machiry 5cefa6f
More safe handling of WILD types in function subtying
Machiry ae23678
More safe handling of WILD types in function subtying
Machiry d624a2c
Fixing nits and adding cache for absolute file paths
Machiry 06be7d6
Adding simpler way to get itype pointer kind
Machiry 53c3c7f
Adding more comments
Machiry b98ef4d
Efficient way to check NULL Ptr expression
Machiry 0619d8c
Removing isNULLExpression function and replacing it with a general fu…
Machiry 689ddbb
Adding comments
Machiry bc88178
Converting all tests to llvm-lit tests
Machiry 88f24b0
Fixing coding style issues
Machiry 47f4b5a
Adding comments
Machiry 2be4860
Adding spaces
Machiry a801916
Fixing spaces
Machiry 70f35f3
Adding space after if
Machiry 6cf3819
Fixing space issue in itype
Machiry 0b4a1ea
Removing unnecessary functions and replacing with clang functions
Machiry 585d3f3
Fixing spelling issues and code clean up
Machiry b5808bd
Fixing comments length
Machiry c015941
Fixing typos in comments
Machiry c973489
Adding space for if
Machiry daff74f
Adding space
Machiry 9ff5b3f
Fixing typos in comments
Machiry a910eda
Adding documentation for the pull request
Machiry c826a17
Fixing link.
Machiry 23d3609
Minor fix in the documentation.
Machiry ad94795
Add an AST identifier to PersistentSourceLocation.
rchyena e15b437
Merge accepted PR branch 'PR/aravind-all' into dev.
rchyena eca4529
Bring 'dev' up-to-date with Microsoft's 'master'.
rchyena 0641e8d
Merge branch 'dev' into dev-fixes.
rchyena 71fc4c4
Merge remote branch 'microsoft/master' into dev.
rchyena 14c3447
Merge branch 'dev' into dev-fixes
rchyena 1ff694a
Limit AST ID to FunctionDecl objects.
rchyena f9d1d17
Merge branch 'microsoft/master' into dev.
rchyena eee525f
Revert changes to PersistentSourceLoc.
rchyena 247f2d2
Merge branch 'dev' into dev-fixes
rchyena f18f476
Fixing minor coding style related issues
Machiry 725147c
Resolving issues
Machiry 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Tests for Checked C rewriter tool. | ||
// | ||
// Tests checked-c-convert tool for any regressions. | ||
// | ||
// RUN: checked-c-convert %s -- | FileCheck -match-full-lines %s | ||
// | ||
|
||
#include <stdlib_checked.h> | ||
|
||
int main() { | ||
|
||
char *ptr1 = NULL; | ||
|
||
ptr1 = (char *) calloc(1, sizeof(char)); | ||
|
||
return 0; | ||
} | ||
//CHECK: _Ptr<char> ptr1 = NULL; |
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.