> On April 5, 2019, 11:57 a.m., Benjamin Bannier wrote: > > src/slave/containerizer/mesos/provisioner/docker/store.cpp > > Line 449 (original), 449 (patched) > > <https://reviews.apache.org/r/70405/diff/1/?file=2137670#file2137670line449> > > > > We only depend on `this` so we can access a single `flags` member. I > > think just copying that value and capturing that instead would be a better > > approach (e.g., doesn't need to be deferred but can return ASAP). > > > > Do we expect that we'll add more or could we do that?
I would prefer not to eliminate a `defer()` call for the sake of code consistency. - Andrei ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70405/#review214415 ----------------------------------------------------------- On April 5, 2019, 11:53 a.m., Andrei Budnik wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70405/ > ----------------------------------------------------------- > > (Updated April 5, 2019, 11:53 a.m.) > > > Review request for mesos, Benjamin Bannier, Gilbert Song, and Qian Zhang. > > > Bugs: MESOS-6934 > https://issues.apache.org/jira/browse/MESOS-6934 > > > Repository: mesos > > > Description > ------- > > Deferred lambda callback of the `moveLayers()` to the `StoreProcess` > to prevent use-after-free of the process object since the callback > refers to the `StoreProcess` class variable `flags`. > > > Diffs > ----- > > src/slave/containerizer/mesos/provisioner/docker/store.cpp > 909364d21318956ed5e4c53419479d6d38d83858 > > > Diff: https://reviews.apache.org/r/70405/diff/1/ > > > Testing > ------- > > sudo make check > > > Thanks, > > Andrei Budnik > >
