Clang build fails compile on "sandbox/win/src/process_policy_test.cc"
Broken build log: https://build.chromium.org/p/chromium.fyi/builders/CrWinClang%28dbg%29/builds/7849/steps/compile/logs/stdio
Suspected change:
commit 5ce7612392ac2b13f0c1dda92467eb6b106538ac [log] [tgz]
author wfh <wfh@chromium.org> Fri Mar 25 01:48:57 2016
committer Commit bot <commit-bot@chromium.org> Fri Mar 25 01:50:11 2016
tree ad71a761d6d082a9ad8923f815befc4c29027b87
parent 209264cd067eb5a00dc218ba6fa55c34a6ca01a8 [diff]
Correctly handle child processes of sandboxed target processes.
If the Job blocks child process creation then
JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT followed by a
JOB_OBJECT_MSG_EXIT_PROCESS is sent to the job completion port of the
calling process.
This was causing a mismatch in the target_process count since it was not
being incremented. This CL correctly increments target_counter when
these phantom processes are blocked.
Since it's not possible to know the process id of a a process that has
been blocked by the Job process limit, this CL adds a second counter to
track these untracked processes and verifies when receving a
JOB_OBJECT_MSG_EXIT_PROCESS or JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS that
it is either a fully tracked process in broker->child_process_ids_ or
that it is an untracked child process of a target.
This also adds tests for the case when a child process and a child
process of a target crash, which tests the
JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS path which was previously untested.
BUG= 584753
TEST=sbox_integration_tests
Review URL: https://codereview.chromium.org/1826223004
Cr-Commit-Position: refs/heads/master@{#383221}
sandbox/win/src/broker_services.cc[diff]
sandbox/win/src/process_mitigations_test.cc[diff]
sandbox/win/src/process_policy_test.cc[diff]
Comment 1 by vmi...@chromium.org
, Mar 25 2016