[compiler-rt] [ASan][Windows] Honor asan config flags on windows when set through the user function (PR #122990)
David Justo via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 2 10:12:40 PDT 2025
================
@@ -460,6 +492,13 @@ static bool AsanInitInternal() {
allocator_options.SetFrom(flags(), common_flags());
InitializeAllocator(allocator_options);
+ // Apply ASan flags.
+ // NOTE: In order for options specified through `__asan_default_options` to be
+ // honored on Windows, it is necessary for those options to be configured
+ // inside the `ApplyOptions` method. See the function-level comment for
+ // `ApplyFlags` for more details.
+ ApplyFlags();
----------------
davidmrdavid wrote:
I think we can definitely set `log_path` in both locations, that seems fine to me :) .
As for the optimizing of opening and closing file handles (I think that's what you mean here?), that might be tougher.
For simplicity, I'll opt to scope out the change to `__sanitizer_set_report_path(common_flags()->log_path);`. I'll leave it in its original location.
https://github.com/llvm/llvm-project/pull/122990
More information about the llvm-commits
mailing list