Details
-
Bug
-
Status: Accepted
-
Major
-
Resolution: Unresolved
-
1.0.0
-
None
Description
Our custom clang-tidy checks identified the following use of this capture without dispatch / defer.
src/docker/executor.cpp:396:38: warning: callback capturing this should be dispatched/deferred to a specific PID [mesos-this-capture] .after(DOCKER_INSPECT_TIMEOUT, [=](const Future<Nothing>&) { ^
The issue here is that the stored callback modifies the member variable inspect, but is not tied to the instance's lifetime. In general such access can lead to data races, or in more extreme cases cause the callback to work on already cleaned up memory.