Skip to content

Fix ubsan introduced by Field refactoring.#7376

Merged
alexey-milovidov merged 1 commit intoClickHouse:masterfrom
amosbird:helpakuzm
Oct 18, 2019
Merged

Fix ubsan introduced by Field refactoring.#7376
alexey-milovidov merged 1 commit intoClickHouse:masterfrom
amosbird:helpakuzm

Conversation

@amosbird
Copy link
Copy Markdown
Collaborator

@amosbird amosbird commented Oct 17, 2019

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

which is also acted as an empty guard for destroy and should be set after new.

This ubsan can be reproduced using the following SQL along with this pr #7179

SET max_memory_usage = 1000000000;
SELECT
    number,
    argMax(number, tuple(toFixedString('1234567890123456789012', 25)))
FROM numbers(100000000);

Why did CI not catch this? Because it only happens when the memory exception is thrown right after a field is created (note the string size, <=22 is fine), which is very unlikely.

Category (leave one):

  • Bug Fix

@alexey-milovidov alexey-milovidov merged commit 3803d94 into ClickHouse:master Oct 18, 2019
@akuzm akuzm added the pr-improvement Pull request with some product improvements label Oct 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants