tokio_macros cause RUSTFLAGS=-Zsanitizer=address test to fail #5519
-
I'm trying to run a sanitizer test on my crate but I'm running into some cargo +nightly --version
cargo 1.69.0-nightly (9d5b32f50 2023-02-22) $ RUSTFLAGS=-Zsanitizer=address cargo +nightly test
...
Compiling tracing-test-macro v0.2.4
Compiling intel-onevpl-sys v0.1.0 (/home/ayrton/onevpl-rs/intel-onevpl-sys)
error: /home/ayrton/onevpl-rs/target/debug/deps/libtokio_macros-c5ca0b39a8222a1e.so: undefined symbol: __asan_option_detect_stack_use_after_return
--> /home/ayrton/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/lib.rs:589:13
|
589 | pub use tokio_macros::select_priv_declare_output_enum;
| ^^^^^^^^^^^^
error: /home/ayrton/onevpl-rs/target/debug/deps/libtokio_macros-c5ca0b39a8222a1e.so: undefined symbol: __asan_option_detect_stack_use_after_return
--> /home/ayrton/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/lib.rs:595:13
|
595 | pub use tokio_macros::select_priv_clean_pattern;
| ^^^^^^^^^^^^
error: /home/ayrton/onevpl-rs/target/debug/deps/libtokio_macros-c5ca0b39a8222a1e.so: undefined symbol: __asan_option_detect_stack_use_after_return
--> /home/ayrton/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/lib.rs:612:21
|
612 | pub use tokio_macros::main_rt as main;
| ^^^^^^^^^^^^
error: /home/ayrton/onevpl-rs/target/debug/deps/libtokio_macros-c5ca0b39a8222a1e.so: undefined symbol: __asan_option_detect_stack_use_after_return
--> /home/ayrton/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/lib.rs:615:21
|
615 | pub use tokio_macros::test_rt as test;
| ^^^^^^^^^^^^
Compiling tracing v0.1.37
error: /home/ayrton/onevpl-rs/target/debug/deps/libtracing_attributes-87e974072eda543a.so: undefined symbol: __asan_option_detect_stack_use_after_return
--> /home/ayrton/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-0.1.37/src/lib.rs:959:9
|
959 | pub use tracing_attributes::instrument;
| ^^^^^^^^^^^^^^^^^^
error: could not compile `tracing` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `tokio` due to 4 previous errors |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
We run Tokio's tests with asan using the following configuration: tokio/.github/workflows/ci.yml Lines 213 to 231 in ee1c940 Perhaps you're missing the llvm package that it installs on line 220? |
Beta Was this translation helpful? Give feedback.
-
You have to pass See also documentation of
|
Beta Was this translation helpful? Give feedback.
You have to pass
--target
flag.See also documentation of
-Z sanitizer
: