Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
[3.7] bpo-29505: Add more fuzzing for re.compile, re.load and csv.reader (GH-14255)#14479
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Closed
Uh oh!
There was an error while loading.Please reload this page.
Closed
Changes fromall commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
…H-14255)Add more fuzz testing for re.compile, re.load and csv.reader(cherry picked from commit5cbbbd7)Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit4f9a21cb25af2d276b09d34c7f60fee664bb9f5e
There are no files selected for viewing
2 changes: 2 additions & 0 deletionsLib/test/test_xxtestfuzz.py
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
219 changes: 219 additions & 0 deletionsModules/_xxtestfuzz/dictionaries/fuzz_sre_compile.dict
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,219 @@ | ||
| "?" | ||
| "abc" | ||
| "()" | ||
| "[]" | ||
| "abc|def" | ||
| "abc|def|ghi" | ||
| "^xxx$" | ||
| "ab\\b\\d\\bcd" | ||
| "\\w|\\d" | ||
| "a*?" | ||
| "abc+" | ||
| "abc+?" | ||
| "xyz?" | ||
| "xyz??" | ||
| "xyz{0,1}" | ||
| "xyz{0,1}?" | ||
| "xyz{93}" | ||
| "xyz{1,32}" | ||
| "xyz{1,32}?" | ||
| "xyz{1,}" | ||
| "xyz{1,}?" | ||
| "a\\fb\\nc\\rd\\te\\vf" | ||
| "a\\nb\\bc" | ||
| "(?:foo)" | ||
| "(?: foo )" | ||
| "foo|(bar|baz)|quux" | ||
| "foo(?=bar)baz" | ||
| "foo(?!bar)baz" | ||
| "foo(?<=bar)baz" | ||
| "foo(?<!bar)baz" | ||
| "()" | ||
| "(?=)" | ||
| "[]" | ||
| "[x]" | ||
| "[xyz]" | ||
| "[a-zA-Z0-9]" | ||
| "[-123]" | ||
| "[^123]" | ||
| "]" | ||
| "}" | ||
| "[a-b-c]" | ||
| "[x\\dz]" | ||
| "[\\d-z]" | ||
| "[\\d-\\d]" | ||
| "[z-\\d]" | ||
| "\\cj\\cJ\\ci\\cI\\ck\\cK" | ||
| "\\c!" | ||
| "\\c_" | ||
| "\\c~" | ||
| "[\\c!]" | ||
| "[\\c_]" | ||
| "[\\c~]" | ||
| "[\\ca]" | ||
| "[\\cz]" | ||
| "[\\cA]" | ||
| "[\\cZ]" | ||
| "[\\c1]" | ||
| "\\[\\]\\{\\}\\(\\)\\%\\^\\#\\ " | ||
| "[\\[\\]\\{\\}\\(\\)\\%\\^\\#\\ ]" | ||
| "\\8" | ||
| "\\9" | ||
| "\\11" | ||
| "\\11a" | ||
| "\\011" | ||
| "\\118" | ||
| "\\111" | ||
| "\\1111" | ||
| "(x)(x)(x)\\1" | ||
| "(x)(x)(x)\\2" | ||
| "(x)(x)(x)\\3" | ||
| "(x)(x)(x)\\4" | ||
| "(x)(x)(x)\\1*" | ||
| "(x)(x)(x)\\3*" | ||
| "(x)(x)(x)\\4*" | ||
| "(x)(x)(x)(x)(x)(x)(x)(x)(x)(x)\\10" | ||
| "(x)(x)(x)(x)(x)(x)(x)(x)(x)(x)\\11" | ||
| "(a)\\1" | ||
| "(a\\1)" | ||
| "(\\1a)" | ||
| "(\\2)(\\1)" | ||
| "(?=a){0,10}a" | ||
| "(?=a){1,10}a" | ||
| "(?=a){9,10}a" | ||
| "(?!a)?a" | ||
| "\\1(a)" | ||
| "(?!(a))\\1" | ||
| "(?!\\1(a\\1)\\1)\\1" | ||
| "\\1\\2(a(?:\\1(b\\1\\2))\\2)\\1" | ||
| "[\\0]" | ||
| "[\\11]" | ||
| "[\\11a]" | ||
| "[\\011]" | ||
| "[\\00011]" | ||
| "[\\118]" | ||
| "[\\111]" | ||
| "[\\1111]" | ||
| "\\x60" | ||
| "\\x3z" | ||
| "\\c" | ||
| "\\u0034" | ||
| "\\u003z" | ||
| "foo[z]*" | ||
| "\\u{12345}" | ||
| "\\u{12345}\\u{23456}" | ||
| "\\u{12345}{3}" | ||
| "\\u{12345}*" | ||
| "\\ud808\\udf45*" | ||
| "[\\ud808\\udf45-\\ud809\\udccc]" | ||
| "a" | ||
| "a|b" | ||
| "a\\n" | ||
| "a$" | ||
| "a\\b!" | ||
| "a\\Bb" | ||
| "a*?" | ||
| "a?" | ||
| "a??" | ||
| "a{0,1}?" | ||
| "a{1,2}?" | ||
| "a+?" | ||
| "(a)" | ||
| "(a)\\1" | ||
| "(\\1a)" | ||
| "\\1(a)" | ||
| "a\\s" | ||
| "a\\S" | ||
| "a\\D" | ||
| "a\\w" | ||
| "a\\W" | ||
| "a." | ||
| "a\\q" | ||
| "a[a]" | ||
| "a[^a]" | ||
| "a[a-z]" | ||
| "a(?:b)" | ||
| "a(?=b)" | ||
| "a(?!b)" | ||
| "\\x60" | ||
| "\\u0060" | ||
| "\\cA" | ||
| "\\q" | ||
| "\\1112" | ||
| "(a)\\1" | ||
| "(?!a)?a\\1" | ||
| "(?:(?=a))a\\1" | ||
| "a{}" | ||
| "a{,}" | ||
| "a{" | ||
| "a{z}" | ||
| "a{12z}" | ||
| "a{12," | ||
| "a{12,3b" | ||
| "{}" | ||
| "{,}" | ||
| "{" | ||
| "{z}" | ||
| "{1z}" | ||
| "{12," | ||
| "{12,3b" | ||
| "a" | ||
| "abc" | ||
| "a[bc]d" | ||
| "a|bc" | ||
| "ab|c" | ||
| "a||bc" | ||
| "(?:ab)" | ||
| "(?:ab|cde)" | ||
| "(?:ab)|cde" | ||
| "(ab)" | ||
| "(ab|cde)" | ||
| "(ab)\\1" | ||
| "(ab|cde)\\1" | ||
| "(?:ab)?" | ||
| "(?:ab)+" | ||
| "a?" | ||
| "a+" | ||
| "a??" | ||
| "a*?" | ||
| "a+?" | ||
| "(?:a?)?" | ||
| "(?:a+)?" | ||
| "(?:a?)+" | ||
| "(?:a*)+" | ||
| "(?:a+)+" | ||
| "(?:a?)*" | ||
| "(?:a*)*" | ||
| "(?:a+)*" | ||
| "a{0}" | ||
| "(?:a+){0,0}" | ||
| "a*b" | ||
| "a+b" | ||
| "a*b|c" | ||
| "a+b|c" | ||
| "(?:a{5,1000000}){3,1000000}" | ||
| "(?:ab){4,7}" | ||
| "a\\bc" | ||
| "a\\sc" | ||
| "a\\Sc" | ||
| "a(?=b)c" | ||
| "a(?=bbb|bb)c" | ||
| "a(?!bbb|bb)c" | ||
| "\xe2\x81\xa3" | ||
| "[\xe2\x81\xa3]" | ||
| "\xed\xb0\x80" | ||
| "\xed\xa0\x80" | ||
| "(\xed\xb0\x80)\x01" | ||
| "((\xed\xa0\x80))\x02" | ||
| "\xf0\x9f\x92\xa9" | ||
| "\x01" | ||
| "\x0f" | ||
| "[-\xf0\x9f\x92\xa9]+" | ||
| "[\xf0\x9f\x92\xa9-\xf4\x8f\xbf\xbf]" | ||
| "(?<=)" | ||
| "(?<=a)" | ||
| "(?<!)" | ||
| "(?<!a)" | ||
| "(?<a>)" | ||
| "(?<a>.)" | ||
| "(?<a>.)\\k<a>" |
Binary file addedModules/_xxtestfuzz/fuzz_csv_reader_corpus/test.csv
Binary file not shown.
1 change: 1 addition & 0 deletionsModules/_xxtestfuzz/fuzz_sre_compile_corpus/anchor_links
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 @@ | ||
| XX<a\s*href=(.*?)[\s|>] |
1 change: 1 addition & 0 deletionsModules/_xxtestfuzz/fuzz_sre_compile_corpus/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 @@ | ||
| XX^(Tim|Robert)\s+the\s+(Enchanter|Shrubber)$ |
1 change: 1 addition & 0 deletionsModules/_xxtestfuzz/fuzz_sre_compile_corpus/isbn
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 @@ | ||
| XX/((978[\--– ])?[0-9][0-9\--– ]{10}[\--– ][0-9xX])|((978)?[0-9]{9}[0-9Xx])/ |
1 change: 1 addition & 0 deletionsModules/_xxtestfuzz/fuzz_sre_compile_corpus/phone_number
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 @@ | ||
| XX(\+1|1)?[ \-\.]?\(?(?<areacode>[0-9]{3})\)?[ \-\.]?(?<prefix>[0-9]{3})[ \-\.]?(?<number>[0-9]{4})[ \.]*(ext|x)?[ \.]*(?<extension>[0-9]{0,5}) |
3 changes: 3 additions & 0 deletionsModules/_xxtestfuzz/fuzz_tests.txt
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 |
|---|---|---|
| @@ -2,3 +2,6 @@ fuzz_builtin_float | ||
| fuzz_builtin_int | ||
| fuzz_builtin_unicode | ||
| fuzz_json_loads | ||
| fuzz_sre_compile | ||
| fuzz_sre_match | ||
| fuzz_csv_reader | ||
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
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.