arm64 + ASan: clang miscompiles preserve_none continuation chains (2,727 CI test failures) #38
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
All `conflict_set_fuzz_*` failures on arm64 in CI (2,340 SEGVs in `interleavedWrites`, 387 in `check`) are caused by a clang codegen bug on aarch64, not by a bug in this codebase.
Evidence
All built from identical source and flags, running the fuzz corpus:
The crash is `interleavedWrites` resuming after the `inProgress->continuation(...)` call and loading a nulled pointer from its own frame (SEGV reading address 0x8 = `entry.rangeVersion` offset of a null `Node*`), i.e. the `preserve_none` callee chain corrupts caller state that ASan's instrumentation rearranged. Adding/removing an ABI attribute must not change observable behavior of correct C++, so this is a compiler bug.
Action item
Minimize and file an LLVM bug (https://github.com/llvm/llvm-project/issues). Note: a naive small musttail+preserve_none+ASan state machine does NOT reproduce; minimization from ConflictSet.cpp (creduce or manual) is needed. Reproduces on any aarch64 host with:
Workaround
Disable `preserve_none` when building with ASan on aarch64 (keeps it in production builds and in x86-64 ASan CI coverage).