Skip to content

Fails to compile with asan on nightly #2

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

Closed
changhe3 opened this issue Aug 24, 2022 · 2 comments
Closed

Fails to compile with asan on nightly #2

changhe3 opened this issue Aug 24, 2022 · 2 comments
Labels
question Further information is requested

Comments

@changhe3
Copy link

~$ RUSTFLAGS=-Zsanitizer=address cargo test
   Compiling proc-macro2 v1.0.43
   Compiling unicode-ident v1.0.3
   Compiling quote v1.0.21
   Compiling syn v1.0.99
   Compiling ext-trait-proc_macros v1.0.1
   Compiling ext-trait v1.0.1
error: /.../target/debug/deps/libext_trait_proc_macros-7a93cbfff318ae9a.so: undefined symbol: __asan_option_detect_stack_use_after_return
  --> ~/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/ext-trait-1.0.1/src/lib.rs:35:11
   |
35 | pub use ::ext_trait_proc_macros::extension;
   |           ^^^^^^^^^^^^^^^^^^^^^

error: could not compile `ext-trait` due to previous error
@danielhenrymantilla danielhenrymantilla added the question Further information is requested label Aug 24, 2022
@danielhenrymantilla
Copy link
Owner

danielhenrymantilla commented Aug 24, 2022

This seems to be rust-lang/cargo#10666

Locate the target triplet for your host machine, such as by doing:

rustc -vV | sed -nE 's/^host: (.*)/\1/p'  # host-triplet

and then pass --target host-triplet to your compilation command.

One-liner:

RUSTFLAGS=-Zsanitizer=address cargo test --target "$(rustc -vV | sed -nE 's/^host: (.*)/\1/p')"

@danielhenrymantilla
Copy link
Owner

danielhenrymantilla commented Aug 24, 2022

I'm gonna close this since it's out of the scope of this crate / it's Cargo's job to fix the need for the --target workaround, but we can keep nonetheless keep discussing over here 🙂

@danielhenrymantilla danielhenrymantilla closed this as not planned Won't fix, can't repro, duplicate, stale Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants