{{ message }}
Sync FailPoint with private#105332
Merged
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Contributor
LLVM Coverage ReportChanged lines: 100.00% (7/7) · Uncovered code |
This was referenced May 20, 2026
pull Bot
pushed a commit
to peijunlin2008/ClickHouse
that referenced
this pull request
Jun 11, 2026
`AddDefaultDatabaseVisitor::visit(ASTSelectQuery &, ASTPtr &)` guards its WITH-traversal on `select.recursive_with` but then dereferences `select.with()->children` unconditionally. The parser sets the flag together with a non-empty WITH expression, but AST mutation after parsing (server-side `BuzzHouse` fuzzing, in particular) can leave the flag set while the expression is absent, producing a null pointer dereference inside `IStorageCluster::read`. Surfaced by `BuzzHouse (amd_tsan)` as `STID: 3440-3393` on PRs ClickHouse#104969 and ClickHouse#105332 (two unrelated PRs in five days). Guard the dereference with the actual presence of the WITH expression, matching the pattern already used in `ASTSelectQuery::formatImpl` and `QueryTreeBuilder::buildSelectQuery`. Valid `WITH RECURSIVE x AS ...` queries are unaffected. Adds a `gtest` that constructs the inconsistent AST shape, runs the visitor, and asserts no fatal failure; the test reliably aborts on the previous code with the `boost::intrusive_ptr` null-deref assertion. Closes ClickHouse#105370 CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=105332&sha=ac51d1463d5def7f7ba0354f581e078cbf10d6c6&name_0=PR&name_1=BuzzHouse%20%28amd_tsan%29 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 task
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.

Changelog category (leave one):
Version info
26.5.1.859