Skip to content

Commit db9e0a1

Browse files
committed
auto merge of #14787 : alexcrichton/rust/issue-14784, r=pcwalton
This is another case of #13246. The RAII lock wasn't being destroyed until after the allocation was free'd due to destructor scheduling. Closes #14784
2 parents 4fdc27e + 4fecc50 commit db9e0a1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustrt/at_exit_imp.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ pub fn run() {
5454
rtassert!(queue != 0);
5555

5656
let queue: Box<Queue> = mem::transmute(queue);
57-
mem::replace(&mut *queue.lock(), Vec::new())
57+
let v = mem::replace(&mut *queue.lock(), Vec::new());
58+
v
5859
};
5960

6061
for to_run in cur.move_iter() {

0 commit comments

Comments
 (0)