Repository navigation
Improve sanitizer robustness in three unit-test-discovered edge cases - #103489
Conversation
Fix two sanitizer findings from CI run #99740: - Guard `Lexer::nextToken` max-query-size check for null input pointers to avoid UBSan pointer arithmetic exception. - Return early in `HasSubsequenceImpl::hasSubsequenceUTF8` for empty haystack before first UTF-8 decode to avoid MSan uninitialized read exception. Also add targeted parser/gtest and stateless SQL regression coverage for the new edge cases. Co-authored-by: Yakov Olkhovskiy <[email protected]>
|
|
|
Workflow [PR], commit [6f9cec5] Summary: ✅ AI ReviewSummaryThis PR hardens three edge cases found by sanitizer-driven follow-up testing: empty-input handling in ClickHouse Rules
Final Verdict
|
LLVM Coverage Report
Changed lines: 100.00% (20/20) · Uncovered code |
…n-crash Resolve conflict in src/Storages/StorageBuffer.cpp: - Master refactored the virtuals API (storage_snapshot->virtual_columns was removed, virtuals now live in metadata->virtuals). - The unused 'virtual_columns' member I introduced in PR ClickHouse#102470 was dead code; drop it. - Keep the 'metadata' member — used in generate() via columns_desc = metadata->getColumns() to resolve subcolumn names. Pulls in trunk fix ClickHouse#103489 (yakov-olkhovskiy) for the unrelated Unit tests (msan, function_prop_fuzzer) failures.
|
Backporting to fix CI |
Backport #103489 to 26.3: Improve sanitizer robustness in three unit-test-discovered edge cases
This PR contains only the three edge-case fixes found by unit tests in the follow-up CI runs related to #99740.
Included fixes:
getURLScheme: handle empty input before first character access;Lexer::nextToken: guardmax_query_sizepointer comparison when lexer input pointers are null;HasSubsequenceImpl::hasSubsequenceUTF8: return early for empty haystack before first UTF-8 decode.Coverage updates in this PR:
max_query_size;Original PR where issues were discovered: #99740
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Improved sanitizer robustness in parser and string-function edge cases by handling empty input in
getURLScheme, avoiding null-pointer arithmetic inLexer::nextTokenmax_query_sizechecks, and short-circuiting UTF-8 subsequence evaluation on empty haystacks before decoding.Documentation entry for user-facing changes
Version info
26.5.1.55-master(included in26.5and later)