Closed
Description
Compiling the following code with opt-level=0
, Valgrind reports 26 allocs for rustc 1.2.0 (082e47636 2015-08-03)
, but 5 allocs for rustc 1.4.0-nightly (cd138dc44 2015-09-02)
:
fn main() {
let mut t = 0;
for i in 0..10 {
t += *Box::new(i);
}
assert_eq!(t, 45);
}
Perhaps this has something to do with #27400? In any case, it's harder to use Valgrind to debug Rust programs because of this.