-
Notifications
You must be signed in to change notification settings - Fork 79
Merge from 3C 2021-02 #993
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
sulekhark
merged 1,546 commits into
checkedc:master
from
correctcomputation:pr-to-microsoft-202102
Mar 15, 2021
Merged
Merge from 3C 2021-02 #993
sulekhark
merged 1,546 commits into
checkedc:master
from
correctcomputation:pr-to-microsoft-202102
Mar 15, 2021
Conversation
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
Root cause of wildness improvements
Instead of considering a pointer "originally checked" if any one of the pointer levels in it is checked in the source, characterize each pointer level individually.
Major refactoring of array bounds code and some performance improvements
293 convert partial
Fixing array length inference performance issue
Revert "Fixing array length inference performance issue"
Major refactoring of array bounds code and some performance improvements
) Fixes a error in rewriting for function declaration such as typedef void foo(int*); foo bar; void bar(int *a){}; Previously `FunctionDeclBuilder` only replaced the parameter declaration of `bar` because nothing in the return type needed to be rewritten. This caused the rewriting of the first declaration to be missing the return type. With this change, `FunctionDeclBuilder` detects that `bar` is declared using a typedef type, and generates replacement text for the entire declaration instead of only the parameter list. This change does not implement proper constraint generation for these function, so the typedef foo is not rewritten. Reconstruct a parameter declaration if we can't get its original source due to a macro. Co-authored-by: Matt McCutchen (Correct Computation) <[email protected]>
Hopefully fixes #378 for real this time.
The type va_list is defined as a reference type on windows. This wasn't handled by 3C since references are typically only allowed in C++. By skipping past the reference type we are able to generate correct constraints for variable argument functions on windows.
…456) This may significantly speed up the build.
This was the cause of the `definedType.c` failure on Windows X86, so we can now re-enable that test. We also have a dedicated test for the bug that should work in our main Linux environment. Fixes #345.
The removed conditional stopped constraint variables being created for fields of structures that were defined in macros. The original reason for adding this is unclear, but removing it seems to be correct.
The if statement that tries to replace an existing cast with a new cast assumed that the new cast was a c-style cast and not a CheckedC bounds cast. If the branch was taken when inserting a bounds cast, the leading '_' was cut off, resulting in invalid code. This commit adds a condition that ensures this does not happen.
…nings. (#461) While we're here: - Add note about -allow-unwritable-changes to the unwritable change error, and change the existing note to have no location for consistency with the others. - Fix a highly visible typo in a `3c` error message.
Thank you for this PR! The changes look good to me. Here are two minor review comments:
|
Thanks for the review.
|
The |
Thank you! LGTM. I have started the tests. |
It looks like the tests have passed. If you're ready to merge this PR, please remember to "Create a merge commit", not "Squash and merge". |
Merged
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.
Here's a sneak peek at what's coming. You can see what we have left to do on our GitHub project. If you feel like going ahead and looking at this PR and you spot any problems that are not already on our project, please let me know here.
As of now, we're able to run the tests on both Windows X64 and Windows X86 (a release build because of the crash in the debug build; it looks like you're doing the same). Assuming that keeps working, we'll verify that the 3C tests pass in both of those configurations before declaring the PR ready for review, so hopefully your tests will pass too (modulo any existing failures you're still working on). Nevertheless, please run them before merging this PR. We won't be responsible for rushing to fix failures on your master branch after merging, though of course you can mark any failing tests
UNSUPPORTED: system-windows
yourselves and then file issues with us to get them fixed.Because our previous PR (#930) was squash-merged, many of our commits have not yet entered your history even though the changes have; we've applied a workaround to ensure that this does not result in this PR merging incorrectly. Here are the commits that actually represent new changes; you'll see that the content diff is identical. To prevent the problem from happening again on our next PR, please remember to merge this PR with a merge commit per our agreement, rather than squash-merging as you do for routine PRs.