Closed elichai closed 1 year ago
I see now there's an open PR to enable -Zbuild-std
https://github.com/rust-fuzz/cargo-fuzz/pull/292
Does this have any advantages over adding -Zbuild-std
support given that we already have sanitizer support?
@fitzgen -Zbuild-std
together with -Cdebug-assertions=on -Zextra-const-ub-checks -Zstrict-init-checks --cfg "careful"
will basically give cargo-careful
, the upside of these over just build-std+sanitizer is:
strict-init-checks
flag, on one hand, any invalid operation on uninitialized data should be catched by memsan, on the other hand, MIR optimization could also influence this (not sure what's the current state of MIR optimizations)Yeah I guess I would rather use these -Z
rustc flags ourselves than add another layer around cargo
.
cargo-careful enables debug assertions and some UB checks in libstd, I think it would be useful if we can fuzz under that configuration https://github.com/RalfJung/cargo-careful
(@RalfJung Might be of interest to you)