-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix possible double-free in Aggregator #52439
Merged
Merged
Conversation
This file contains 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
robot-clickhouse-ci-1
added
the
pr-bugfix
Pull request with bugfix, not backported by default
label
Jul 21, 2023
This is an automated comment for commit cd193ed with description of existing statuses. It's updated for the latest CI running
|
nickitat
force-pushed
the
fix_double_free_in_aggr
branch
from
July 24, 2023 10:09
7efae47
to
8dd5cdf
Compare
Avogar
approved these changes
Jul 24, 2023
only |
azat
added a commit
to azat/ClickHouse
that referenced
this pull request
Mar 11, 2024
The memory limit had been changed in ClickHouse#52439 CI: https://s3.amazonaws.com/clickhouse-test-reports/61132/04d885b570325b1e66bf0c7c13d4732b4d9340ec/integration_tests__tsan__[2_6].html Signed-off-by: Azat Khuzhin <[email protected]>
25 tasks
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):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fixed very unlikely double-free attempt on aggregation state memory in case of memory limit exception.
Problem was in
convertToBlockImplNotFinal
. To avoid double-free we setmapped = nullptr
after inserting into aggr function column. We rely on reserve here to avoid exception between insertion into first aggr function column andmapped = nullptr
(l. 2148). Whenreturn_single_block
is true we preallocated not enough memory, so exception was still possible.ASan report