DescriptionFixed member use after destruction in BarrierClosure.
If client releases BarrierClosure during |done_closure_| invocation, the closure
is destructed together with BarrierInfo object that it owns. After that
BarrierInfo tries to call |done_closure_.Reset()| which leads to SIGSEGV.
Fixed that by saving |done_clusure| to a stack variable.
BUG=none
TEST=base_unittests --gtest_filter=BarrierClosureTest.KeepingClosureAliveUntilDone
Committed: https://crrev.com/0a3f459d5d61443db9989db8201908bf68a684e9
Cr-Commit-Position: refs/heads/master@{#328669}
Patch Set 1 #
Total comments: 6
Patch Set 2 : Reset |done_closure_| #Patch Set 3 : Added test case. #
Total comments: 8
Patch Set 4 : Comments addressed. #
Messages
Total messages: 11 (2 generated)
|