Disable preserve_none under ASAN due to bugs#21676
Disable preserve_none under ASAN due to bugs#21676morrisonlevi wants to merge 1 commit intophp:masterfrom
Conversation
|
This is a bit unfortunate, as it makes it impossible to test the tailcall VM with ASAN. The error disappeared for me with Clang 21 (see llvm/llvm-project#95928 (comment)). Which Clang version are you running? |
|
I had issues on clang 19 (to intentionally match Rust 1.84-1.88 for cross-langauge LTO and other reasons) on aarch64. I saw your comment when looking at the PRs! "Hey, that's a friendly face!" However, the fact that LLVM disabled it in main just a week ago does not give me confidence to enable this for any version, when ASAN is enabled, which is why I opened this PR. They cited issues on x86_64 as well. Thoughts? |
Yeah, that's fair. Though it's also possible this is only an issue with C++ in Clang 20+, but not C. Hence I'd prefer only enabling this if we run into an actual issue, especially considering this is exclusively a development configuration. But ultimately, Arnaud should decide. |
|
Or maybe disable it only for Clang 19 and lower. |
|
There appears to be two known issues with
For the first issue, I agree that we should disable I've investigated the second issue a bit, and found that it's likely a more general AArch64+preserve_none issue, unfortunately: llvm/llvm-project#177519 (comment). This happens in specific conditions where the compiler can not use the stack pointer directly, and must address locals via x19, the "base pointer". The spilling logic in the AArch64 backend seems to ignore x19 in that case. This affects functions that:
I need to looks more into it, but I think that this doesn't affect php-src, or we could workaround the issue. The only function that calls a |
See:
preserve_noneunder ASan llvm/llvm-project#190001, which merged just last week (April 1, 2026)