Should it work under Memory Sanitizer and Undefined Behavior Sanitizer?
It fails in our builds: https://github.com/ClickHouse/ClickHouse/pull/11718
MSan fails in roseRunProgram: https://clickhouse-test-reports.s3.yandex.net/11718/abb59a262134987adf07b99d714efa51dcea170b/functional_stateful_tests_(memory)/stderr.log
UBSan fails in ../contrib/hyperscan/src/nfa/mcclellan.c:1136:33: runtime error: applying zero offset to null pointer: https://clickhouse-test-reports.s3.yandex.net/11718/e85227ce2e6df40b33d11b15b37775411bcad1f2/functional_stateful_tests_(ubsan)/stderr.log
Another question: why do you have -fno-strict-aliasing and -O2 instead of -O3?
Thanks for the questions.
- We'll have a fix for this UBSan issue.
- The MSan issue looks like a false positive to me as there's no explicit code that triggers it.
-fno-strict-aliasing and -O2 is only for compile time code which involves complex analysis and database generation that may not strictly comply with the aliasing rule. This option was written many years ago by our former engineer. It works good in our internal large scale nightly testing with both realistic and synthetic patterns and input traffic.
Thank you!