Henry Robinson has posted comments on this change.

Change subject: IMPALA-4532: Fix use-after-free in ProcessBuildInputAsync()
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/5246/1/be/src/exec/blocking-join-node.cc
File be/src/exec/blocking-join-node.cc:

PS1, Line 167: // Please keep this as the last line in this function to avoid 
use-after-free problem.
             :   // Once 'status' is set, ProcessBuildInputAndProbe() will 
start running and 'states'
             :   // may have been freed after this line once the query 
completes. IMPALA-4532.
             :   // TODO: Make this less fragile.
             :   status->Set(s);
I just added ScopeExitTrigger which might be useful here? You'd do something 
like:

  ScopeExitTrigger trigger([&s, status]() { status->Set(s); });

which would ensure the invariant of status always being set as the last action 
of the method.


-- 
To view, visit http://gerrit.cloudera.org:8080/5246
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6bfd094e2e9500f1b7843486f3f745cb921764d4
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Michael Ho <[email protected]>
Gerrit-Reviewer: Dan Hecht <[email protected]>
Gerrit-Reviewer: Henry Robinson <[email protected]>
Gerrit-Reviewer: Michael Ho <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to