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
I'm not able to use the sanitizer with one of my program since it uses serde and serde_derive won't build using -Z sanitizer. I'm able to reproduce with:
#[macro_use]externcrate serde_derive;externcrate serde_json;#[derive(Serialize,Deserialize,Debug)]structPoint{x:i32,y:i32,}fnmain(){let point = Point{x:1,y:2};// Convert the Point to a JSON string.let serialized = serde_json::to_string(&point).unwrap();// Prints serialized = {"x":1,"y":2}println!("serialized = {}", serialized);// Convert the JSON string back to a Point.let deserialized:Point = serde_json::from_str(&serialized).unwrap();// Prints deserialized = Point { x: 1, y: 2 }println!("deserialized = {:?}", deserialized);}
rustc 1.17.0-nightly (0e7727795 2017-02-19)
$ RUSTFLAGS="-Z sanitizer=thread" cargo run
Compiling dtoa v0.4.1
Compiling itoa v0.3.1
Compiling quote v0.3.13
Compiling unicode-xid v0.0.4
Compiling serde v0.9.7
Compiling num-traits v0.1.36
Compiling synom v0.11.0
Compiling syn v0.11.6
Compiling serde_json v0.9.7
Compiling serde_codegen_internals v0.13.0
Compiling serde_derive v0.9.7
error: Only executables and rlibs can be compiled with `-Z sanitizer`
error: aborting due to previous error
error: Could not compile `serde_derive`.
The text was updated successfully, but these errors were encountered:
$ RUSTFLAGS="-Z sanitizer=thread" cargo run --target x86_64-unknown-linux-gnu
This is in the README:
Be sure to always pass --target x86_64-unknown-linux-gnu to Cargo or else you'll end up sanitizing the build scripts that Cargo runs or run into compilation error if your crate depends on a dylib.
I'm not able to use the sanitizer with one of my program since it uses serde and serde_derive won't build using
-Z sanitizer
. I'm able to reproduce with:rustc 1.17.0-nightly (0e7727795 2017-02-19)
The text was updated successfully, but these errors were encountered: