You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cargo could not load address sanitizer correctly when testing, it reported as below:
==45307==ERROR: Interceptors are not working. This may be because AddressSanitizer is loaded too late (e.g. via dlopen). Please launch the executable with:
DYLD_INSERT_LIBRARIES=/Users/psionic12/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc-nightly_rt.asan.dylib
I introduced asan by adding a config.toml:
[build]
rustflags = ["-Zsanitizer=address"]
and all the test codes are in the test folder, not in src folder.
I'm not very clear how does cargo test works, I tried to do as the error suggested, but I can't find the executable of my tests, does cargo test executable even exists?
The text was updated successfully, but these errors were encountered:
Thanks for the report! I believe you should be able to work around the issue by passing --target x86_64-apple-darwin (it's hard to say without seeing the full error). The problem is that the sanitizer flag is being passed to host dependencies, like proc macros.
Assuming that's the issue, I'm going to close this as a duplicate of rust-lang/rust#63986 and #3739. If you have further issues with using sanitizers, I would recommend filing issues at https://github.com/rust-lang/rust/issues as Cargo doesn't really have any interaction with them.
Cargo could not load address sanitizer correctly when testing, it reported as below:
I introduced asan by adding a config.toml:
and all the test codes are in the test folder, not in src folder.
I'm not very clear how does cargo test works, I tried to do as the error suggested, but I can't find the executable of my tests, does cargo test executable even exists?
The text was updated successfully, but these errors were encountered: