Skip to content

fix compatibility between hardening and asan#68

Closed
mstetsyuk wants to merge 1 commit intoclickhouse1from
fix-hardening-asan-compatibility
Closed

fix compatibility between hardening and asan#68
mstetsyuk wants to merge 1 commit intoclickhouse1from
fix-hardening-asan-compatibility

Conversation

@mstetsyuk
Copy link
Copy Markdown
Member

In the PR where I enabled the hardening, there's an ASan error (consistent and unique to the PR - cidb).

It occurs in unique_ptr code:

#0 0x55e850dee87e in std::__1::unique_ptr<DB::(anonymous namespace)::AggregateFunctionThrowData [], std::__1::default_delete<DB::(anonymous namespace)::AggregateFunctionThrowData []>>::operator[][abi:fe210105](unsigned long) const ci/tmp/build/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:581:5

because __in_bounds reads array cookie directly from memory which is marked as poisoned by the sanitizer.

That should be read via __asan_load_cxx_array_cookie (code) instead as it checks if the memory is marked as kAsanArrayCookieMagic and if so, just returns the cookie.

@mstetsyuk mstetsyuk closed this Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant