Repository navigation
Backport #108493 to 26.3: Fix crash on deeply nested expressions with raised max_parser_depth - #108897
Conversation
… raised max_parser_depth
29e5ee0 to
cc66187
Compare
|
Workflow [BackportPR], commit [472b797] Summary: ✅ |
`ParserCollectionOfLiterals::parseImpl` copied the just-finished nested collection into its parent layer on every closing bracket, making the parsing of a deeply nested literal such as `[[[ ... ]]]` quadratic in its depth. The new test `04412_deep_nested_literal_format` builds `formatQuery([...20000...])`. The `Stress test (amd_tsan)` runner ignores the test's `no-*` tags and runs it anyway, so the quadratic build never finishes in time and trips the "Hung check failed, possible deadlock found" check. Move the value into the parent instead of copying it. `literal` is a local that is discarded right after (only the outermost layer is kept as `node`), so moving its value out is safe and produces an identical `Field`. This mirrors the master change in #108892 and the 26.6 backport in #108832. CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=108897&sha=cc66187446ca00eca7656b498616f904352d22eb&name_0=BackportPR&name_1=Stress%20test%20%28amd_tsan%29 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Merged the latest The sole CI failure was The fix moves the value into the parent instead of copying it ( This mirrors the master change in #108892 and the 26.6 backport in #108832. |
OTHER: deeply nested literal with a large max_parser_depth -> crash. Effect in the production build a394e92: its upstream test(s) 04411_deep_nested_field_to_type, 04412_deep_nested_literal_format, 04413_set_param_deep_collection fail on it (the server process died in 04411_deep_nested_field_to_type) and pass on official 26.8.8.8, run on isolated servers (evidence/fix_ci_20260925/upstream_repro/server_triage_PROD263_vs_UP2688.tsv). Upstream patch unchanged, with its test(s): 04411_deep_nested_field_to_type,04412_deep_nested_literal_format,04413_set_param_deep_collection. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Original pull-request #108493
Cherry-pick pull-request #108829
This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.
The PR source
The PR is created in the CI job
Version info
26.3.17.7