bpo-29505: Fuzz ast.parse() / compile() with PyCF_ONLY_AST#3437
Closed
ssbr wants to merge 2 commits intopython:mainfrom
Closed
bpo-29505: Fuzz ast.parse() / compile() with PyCF_ONLY_AST#3437ssbr wants to merge 2 commits intopython:mainfrom
ssbr wants to merge 2 commits intopython:mainfrom
Conversation
ast.parse() just calls compile() with PyCF_ONLY_AST to exit early, so we emulate that here\ with the call to the corresponding part of the C API. The code for compile() and Py_CompileStringObject() is duplicated, so hypothetically one could have a bug and not the other, but... nah. :)
Contributor
|
This seems fine to me. We never actually got into oss-fuzz, though, right? |
Member
|
Devin, should this be closed, or did it fall through a crack? |
Codecov Report
@@ Coverage Diff @@
## master #3437 +/- ##
===========================================
- Coverage 84.88% 83.22% -1.67%
===========================================
Files 1801 1571 -230
Lines 524801 415192 -109609
Branches 0 44479 +44479
===========================================
- Hits 445489 345526 -99963
+ Misses 79312 60022 -19290
- Partials 0 9644 +9644
Continue to review full report at Codecov.
|
Member
|
Closing in favor of #28777, thank you again for your original work on this Devin. |
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.
ast.parse() just calls compile() with PyCF_ONLY_AST to exit early, so we emulate
that here with the call to the corresponding part of the C API.
https://bugs.python.org/issue29505