Skip to content

Backport #110263 to 26.3: Fix heap-buffer-overflow when serializing a shared quantileTDigest state - #110473

Merged
alexey-milovidov merged 3 commits into
26.3from
backport/26.3/110263
Jul 16, 2026
Merged

alexey-milovidov merged 3 commits into
26.3from
backport/26.3/110263

Conversation

@robot-ch-test-poll3

@robot-ch-test-poll3 robot-ch-test-poll3 commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #110263

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

  • Merged into: 26.3.17.48

@robot-ch-test-poll3 robot-ch-test-poll3 added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default labels Jul 15, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [6380e84]

Summary: ✅

@Algunenano Algunenano removed their assignment Jul 15, 2026
…n 26.3

All builds failed with: no member named 'stableSort' in the global namespace
(`base/sort.h` with `stableSort` does not exist on 26.3). The file already
uses `std::stable_sort` in `sort` and `merge`, so this matches the existing
idiom and is semantically equivalent.

CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110473&sha=2f4fd07d46fc466d1c46a333ea2ebee5258d734d&name_0=BackportPR&name_1=Build%20%28amd_debug%29
PR: #110473
@alexey-milovidov

Copy link
Copy Markdown
Member

All builds failed with no member named 'stableSort' in the global namespace — master's stableSort from base/sort.h does not exist on 26.3. Replaced it with std::stable_sort, matching what this file already uses in sort and merge (semantically equivalent). Also merged the current 26.3 into the branch. Verified the affected translation units (AggregateFunctionSequenceNextNode.cpp, AggregateFunctionQuantileTDigest.cpp, AggregateFunctionQuantileTDigestWeighted.cpp, AggregateFunctionQuantile.cpp) compile against 26.3 headers.

@alexey-milovidov
alexey-milovidov merged commit 7a51fc3 into 26.3 Jul 16, 2026
35 checks passed
@alexey-milovidov
alexey-milovidov deleted the backport/26.3/110263 branch July 16, 2026 01:34
bytehalo-infra added a commit to sentioxyz/ClickHouse that referenced this pull request Sep 25, 2026
AGG: quantileTDigest state as a GROUP BY key, multi-threaded -> crash.
Effect in the production build a394e92: its upstream test(s) 04516_quantile_tdigest_serialize_shared_state fail on it (the server process died in 04516_quantile_tdigest_serialize_shared_state) 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): 04516_quantile_tdigest_serialize_shared_state.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants