Re: [PATCH 1/2] rust: kasan: do not pass -Zsanitizer-recover

From: Danilo Krummrich

Date: Wed Mar 25 2026 - 10:19:10 EST


On Wed Mar 25, 2026 at 12:47 PM CET, Alice Ryhl wrote:
> On Wed, Mar 25, 2026 at 12:06:50PM +0100, Danilo Krummrich wrote:
>> On Wed Mar 25, 2026 at 10:26 AM CET, Alice Ryhl wrote:
>> > We do not pass -fsanitize-recover to clang, so for consistency we should
>> > not pass -Zsanitizer-recover to rustc. Thus, remove these flags.
>>
>> Isn't this because clang forces it regardless? Is this true for rustc as well?
>
> I forgot to mention this in commit, but I'm actually a bit confused
> about the situation here. If clang forces it somehow, how?

I previously had a very brief look at the source code and came across this [1],
where

static const SanitizerMask AlwaysRecoverable = SanitizerKind::KernelAddress |
SanitizerKind::KernelHWAddress |
SanitizerKind::KCFI;

But again, I only had a very brief look and it might well be that I got this
wrong.

[1] https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/SanitizerArgs.cpp#L750

> I don't think rustc does anything like that, but not sure. If it doesn't, but
> clang does, then maybe rustc should too? Depends on how that happens.
>
> Alice