Conversation
The tokenizer never treats a backslash as an escape inside a quoted identifier, but EscapeQuotedString assumed a quote after a backslash was already escaped. The rendered SQL was then unterminated, e.g. SELECT "a\""" displayed as SELECT "a\"" and failed to re-parse. Found by fuzz_parse_roundtrip.
|
No dialect label was applied because the title does not name a SQL dialect. If this change targets one or more dialects, edit the title to |
Contributor
|
@mvisani add to the fuzzer seed corpus the crashing case, so it will be faster to get to next time around |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2593 +/- ##
=======================================
Coverage 81.09% 81.10%
=======================================
Files 42 42
Lines 33684 33695 +11
Branches 33684 33695 +11
=======================================
+ Hits 27316 27327 +11
Misses 2798 2798
Partials 3570 3570 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
The tokenizer never treated a backslash as an escape inside a quoted identifier, but
EscapeQuotedStringassumed a quote after a backslash was already escaped. The rendered SQL was then unterminated, e.g.SELECT "a\"""displayed asSELECT "a\""and failed to re-parse. Found by fuzzingfuzz_parse_roundtrip.