Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upFix memory leak in P::filter_map #57667
Conversation
rust-highfive
assigned
eddyb
Jan 16, 2019
rust-highfive
added
the
S-waiting-on-review
label
Jan 16, 2019
ishitatsuyuki
force-pushed the
ishitatsuyuki:p-leak
branch
from
d8c773c
to
763392c
Jan 16, 2019
This comment has been minimized.
This comment has been minimized.
@bors try |
This comment has been minimized.
This comment has been minimized.
added a commit
that referenced
this pull request
Jan 16, 2019
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
@rust-timer build 4fffff5 |
This comment has been minimized.
This comment has been minimized.
rust-timer
commented
Jan 16, 2019
Success: Queued 4fffff5 with parent e2f221c, comparison URL. |
This comment has been minimized.
This comment has been minimized.
rust-timer
commented
Jan 16, 2019
Finished benchmarking try commit 4fffff5 |
This comment has been minimized.
This comment has been minimized.
r? @nnethercote Edit: couldn't assign as he/she isn't a rust-lang member, but anyway requesting a review based on git blame. |
This comment has been minimized.
This comment has been minimized.
Nice catch. How did you find it? @bors r+ |
This comment has been minimized.
This comment has been minimized.
|
bors
added
S-waiting-on-bors
and removed
S-waiting-on-review
labels
Jan 21, 2019
added a commit
to Centril/rust
that referenced
this pull request
Jan 21, 2019
added a commit
that referenced
this pull request
Jan 22, 2019
This comment has been minimized.
This comment has been minimized.
Nothing special, I was just learning the AST internals and during the review of the source this came up. |
added a commit
to Centril/rust
that referenced
this pull request
Jan 22, 2019
added a commit
that referenced
this pull request
Jan 22, 2019
bors
merged commit 763392c
into
rust-lang:master
Jan 22, 2019
1 check passed
ishitatsuyuki
deleted the
ishitatsuyuki:p-leak
branch
Jan 22, 2019
eddyb
reviewed
Jan 30, 2019
@@ -101,6 +101,7 @@ impl<T: 'static> P<T> { | |||
// Recreate self from the raw pointer. | |||
Some(P { ptr: Box::from_raw(p) }) | |||
} else { | |||
drop(Box::from_raw(p)); |
This comment has been minimized.
This comment has been minimized.
eddyb
Jan 30, 2019
Member
This is wrong, because of the ptr::read(p)
call above - you need to deallocate without dropping the T
value inside the Box
.
ishitatsuyuki commentedJan 16, 2019
Probably this function isn't widely used, but anyway this wasn't working as intended.
r? @eddyb
Do not rollup if you want to see if max-rss change in perf.