v1: vm.mmap_rnd_bits=28
v2: rebase with clang 18.1.6 + kernel.randomize_va_space=0
v3: leave only vm.mmap_rnd_bits=28 + use pre-run.sh (hope that it will
be used), that way docker will not require --privileged and by some
reason this breaks ASAN (though I cannot reproduce it)
v4: use actions/common_setup over init_runner.sh (it requires some
manual deploy)
Only SIGSEGV uses alternative stack (sigaltstack()), which is very
small, 16K, and for aarch64 it is likely not enough for unwinding
(likely due to lots of registers on this platform):
(gdb) bt
#0 libunwind::CFI_Parser<libunwind::LocalAddressSpace>::parseFDEInstructions (addressSpace=..., fdeInfo=..., cieInfo=..., upToPC=<optimized out>, arch=4, results=<optimized out>) at ./contrib/libunwind/src/DwarfParser.hpp:561
And this is:
554 case DW_CFA_remember_state: {
555 // Avoid operator new because that would be an upward dependency.
556 // Avoid malloc because it needs heap allocation.
557 PrologInfoStackEntry *entry =
558 (PrologInfoStackEntry *)_LIBUNWIND_REMEMBER_ALLOC(
559 sizeof(PrologInfoStackEntry));
560 if (entry != NULL) {
561 entry->next = rememberStack.entry;
^^^
562 entry->info = *results;
563 rememberStack.entry = entry;
564 } else {
565 return false;
566 }
567 _LIBUNWIND_TRACE_DWARF("DW_CFA_remember_state\n");
568 break;
569 }
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Rebuild for clang 18.1.3, that contains a workaround [1] for sanitizers
issue [2]:
$ git tag --contains c2a57034eff048cd36c563c8e0051db3a70991b3 | tail -1
llvmorg-18.1.3
[1]: c2a57034ef
[2]: https://github.com/ClickHouse/ClickHouse/issues/64086
Since right now version is not enough:
$ docker run --rm -it clickhouse/test-util llvm-nm-18 --version
llvm-nm, compatible with GNU nm
Ubuntu LLVM version 18.1.2
Optimized build.
But I don't see any fix for TSan, only MSan, but let's try.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>