Repository navigation
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 |
|
@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:
|
|
FYI, the fuzzer crash is not caused by your code, just the seed you added facilitated the fuzzer in finding it. Can you please rebase the PR? |
|
@LucaCappelletti94 Should be done ! |
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.