[PATCH] D119711: Add asan support for MSVC debug runtimes

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 14 10:22:19 PST 2022


rnk added subscribers: cbezault, vitalybuka.
rnk added a comment.

I'm hesitant to do this. The main reason we disabled the use of the debug runtimes was that the debug runtimes interfered with malloc interception, which leads to crashes and a generally poor user experience. I'd like some confirmation beyond just your word that this is addressed.

After that, this is kind of scary because we don't build and ship these "dbg" variants of the ASan runtime (so far as I know). They are only provided as part of the MSVC CRT. Is LLVM ASan actually compatible with the ASan runtimes provided by MSVC? I'm guessing the answer that things appear to work, but so far as I know, there is no usptream support for this. If things break, there's nobody who will fix them. I have reached out to Microsoft to ask them to help contribute upstream, but so far I haven't seen major contributions.

This change is one small step towards encouraging users to combine clang-cl with the Microsoft provided ASan runtimes, and I'm not sure we want to guide users in that direction. We only promise interop with compiler runtime libraries that we vend.

Other stakeholders: + at cbezault @vitalybuka



================
Comment at: clang/lib/Driver/SanitizerArgs.cpp:829
-              << lastArgumentForMask(D, Args, SanitizerKind::Address);
-          D.Diag(clang::diag::note_drv_address_sanitizer_debug_runtime);
-        }
----------------
This is the only usage of this note, and if you remove it, the note should be removed as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119711/new/

https://reviews.llvm.org/D119711



More information about the cfe-commits mailing list