{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/28224","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/28224/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/28224/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/28224/events","html_url":"https://github.com/rust-lang/rust/issues/28224","id":104821650,"number":28224,"title":"Valgrind doesn't report allocations with jemalloc on nightly","user":{"login":"apasel422","id":8644784,"avatar_url":"https://avatars.githubusercontent.com/u/8644784?v=3","gravatar_id":"","url":"https://api.github.com/users/apasel422","html_url":"https://github.com/apasel422","followers_url":"https://api.github.com/users/apasel422/followers","following_url":"https://api.github.com/users/apasel422/following{/other_user}","gists_url":"https://api.github.com/users/apasel422/gists{/gist_id}","starred_url":"https://api.github.com/users/apasel422/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apasel422/subscriptions","organizations_url":"https://api.github.com/users/apasel422/orgs","repos_url":"https://api.github.com/users/apasel422/repos","events_url":"https://api.github.com/users/apasel422/events{/privacy}","received_events_url":"https://api.github.com/users/apasel422/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-09-04T02:58:32Z","updated_at":"2015-10-02T23:18:25Z","closed_at":null,"body":"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)`:\r\n\r\n```rust\r\nfn main() {\r\n    let mut t = 0;\r\n\r\n    for i in 0..10 {\r\n        t += *Box::new(i);\r\n    }\r\n\r\n    assert_eq!(t, 45);\r\n}\r\n```\r\n\r\nPerhaps this has something to do with #27400? In any case, it's harder to use Valgrind to debug Rust programs because of this."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/145181385","html_url":"https://github.com/rust-lang/rust/issues/28224#issuecomment-145181385","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/28224","id":145181385,"user":{"login":"shepmaster","id":174509,"avatar_url":"https://avatars.githubusercontent.com/u/174509?v=3","gravatar_id":"","url":"https://api.github.com/users/shepmaster","html_url":"https://github.com/shepmaster","followers_url":"https://api.github.com/users/shepmaster/followers","following_url":"https://api.github.com/users/shepmaster/following{/other_user}","gists_url":"https://api.github.com/users/shepmaster/gists{/gist_id}","starred_url":"https://api.github.com/users/shepmaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shepmaster/subscriptions","organizations_url":"https://api.github.com/users/shepmaster/orgs","repos_url":"https://api.github.com/users/shepmaster/repos","events_url":"https://api.github.com/users/shepmaster/events{/privacy}","received_events_url":"https://api.github.com/users/shepmaster/received_events","type":"User","site_admin":false},"created_at":"2015-10-02T23:18:25Z","updated_at":"2015-10-02T23:18:25Z","body":"FWIW, I ran your example program with `rustc 1.5.0-dev (5f06607e2 2015-09-29)` and `valgrind-3.11.0.SVN` on OS X, and it seems to track allocations:\r\n\r\n```\r\n==28285== HEAP SUMMARY:\r\n==28285==     in use at exit: 35,221 bytes in 426 blocks\r\n==28285==   total heap usage: 611 allocs, 185 frees, 42,405 bytes allocated\r\n```\r\n\r\nTo my knowledge, I have not specified any custom flags when building. I also see that massif reports heap allocations over time, so I have some hope that things are just magically working together now!"}}