-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSVC 14.37.32822 does not ship with stl_asan.lib for arm64 #4035
Comments
Thanks for reporting this issue. This is a known limitation - MSVC's ASAN doesn't yet work on ARM64, which is why the |
So I'm looking for a work around so I can test some arm64 asan improvements I am making for WOA. The next step for me is to standup the compiler-rt tests cases via How can I remove the stl_asan.lib depedency? At this early stage I don't need string or vector annotations. I'm still working on trying to get function hooking working. |
@StephanTLavavej Re-reading my response and your response I don't think I'm conveying the problem properly. To be more clear I think what is going on here is the STL is telling the linker to look for My work around right now is to use visual studio 2019. I'm not entirely sure why 2019 works, but I think the issue I'm running into is related to the |
I see - yes, there does seem to be a bug here. I'll bring it up at the next maintainer meeting on Wednesday (as I am not personally an ASAN expert). |
Oh, this is absolutely a bug in our headers; it makes the assumption that the only ASan you'll be using is ours. This should be reasonably quick to fix; I think the correct thing for now is to remove support on ARM64 for ASan/STL integration without some kind of flag to re-enable. |
Alright, I've done some figuring out; I think there are two things here you can do.
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
namespace std {
extern "C" {
extern const bool _Asan_string_should_annotate = true;
extern const bool _Asan_vector_should_annotate = true;
}
} // namespace std We need I don't believe this is a bug, though. We will ship |
So I actually tried 1 but the llvm cmake keeps ignoring the defines I try to do. But I might try to just add in a cmakefile.txt instead of via the cli.
|
Describe the bug
When trying to build compiler rt test cases on windows I am getting the following linker error:
I reported the bug to llvm, but the fix likely needs to come from MSVC to provide a
stl_asan.lib
for arm64.llvm/llvm-project#66600
Without
stl_asan.lib
you can't build compiler_rt test cases usingCOMPILER_RT_INCLUDE_TESTS
.These test cases are important to validate a port of sanitzers for winodws arm64.
Command-line test case
Possible solutions
for arm64 set:
_DISABLE_STRING_ANNOTATION
and_DISABLE_VECTOR_ANNOTATION
STL/stl/inc/__msvc_sanitizer_annotate_container.hpp
Line 18 in 8f67ece
or remove
defined(_M_ARM64)
so that we don't try to invoke the linker for asan on windows arm64STL/stl/inc/__msvc_sanitizer_annotate_container.hpp
Line 115 in 8f67ece
The text was updated successfully, but these errors were encountered: