Fix crash in CachedOnDiskReadBufferFromFile destructor#99042
Merged
shankar-iyer merged 1 commit intoClickHouse:masterfrom Mar 11, 2026
Merged
Fix crash in CachedOnDiskReadBufferFromFile destructor#99042shankar-iyer merged 1 commit intoClickHouse:masterfrom
shankar-iyer merged 1 commit intoClickHouse:masterfrom
Conversation
Contributor
|
Workflow [PR], commit [39e41c4] Summary: ❌
|
Contributor
LLVM Coverage Report
PR changed lines: PR changed-lines coverage: 100.00% (5/5) |
hanfei1991
approved these changes
Mar 9, 2026
kssenii
approved these changes
Mar 9, 2026
Merged
via the queue into
ClickHouse:master
with commit Mar 11, 2026
587e799
473 of 479 checks passed
robot-clickhouse
added a commit
that referenced
this pull request
Mar 11, 2026
Cherry pick #99042 to 26.2: Fix crash in CachedOnDiskReadBufferFromFile destructor
robot-clickhouse
added a commit
that referenced
this pull request
Mar 11, 2026
clickhouse-gh bot
added a commit
that referenced
this pull request
Mar 11, 2026
Backport #99042 to 26.2: Fix crash in CachedOnDiskReadBufferFromFile destructor
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.
Resolves #99037
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Note
Low Risk
Low risk: adds a null-check before logging in a destructor, reducing crash risk without changing read/cache behavior.
Overview
Prevents a potential crash in
CachedOnDiskReadBufferFromFile::~CachedOnDiskReadBufferFromFile()by guarding filesystem cache logging with astatenull-check before accessingstate->read_type.This avoids dereferencing an uninitialized read state during teardown (e.g., after exceptions) while keeping existing segment completion/cleanup logic unchanged.
Written by Cursor Bugbot for commit 39e41c4. This will update automatically on new commits. Configure here.