summaryrefslogtreecommitdiff
path: root/scripts/update_payload/test_utils.py
diff options
context:
space:
mode:
authorJae Hoon Kim <kimjae@chromium.org>2019-09-10 13:20:48 -0700
committerJae Hoon Kim <kimjae@chromium.org>2019-09-17 20:04:55 +0000
commit0aa7e518afffa655585995416ec91a92ffacd1cb (patch)
treeaa6490cf749f707d47686e6957ca57f3556fa788 /scripts/update_payload/test_utils.py
parent2d311164ce2de193cd837a6922c10204d4c882a9 (diff)
update_engine: AddressSanitizer PostinstallerRunnerAction RunAsRoot leak fix
The reason why this change is required is because of |FileDescriptorWatcher::Controller| within |PostinstallRunnerAction|. If the delay is too short (previously 10ms) it was possible for the posted task within the |FileDescriptorWatcher::Controller| to be present after that of the task which stops the processor. In order to mitigate this issue, the process of stopping the processor should be a |PostDelayedTask()| instead of a direct call in stopping the processor to ensure the processor stops after |Watcher::StartWatching()| happens. Within |FileDescriptorWatcher::Controller| it states: "If the MessageLoopForIO is deleted before Watcher::StartWatching() runs, |watcher_| is leaked." BUG=chromium:989749 TEST=FEATURES="nostrip" ./build_packages --board amd64-generic --withdebugsymbols TEST=FEATURES="test nostrip -splitdebug" USE="asan debug" CFLAGS="-g -O2" CXXFLAGS="-g -O2" emerge-amd64-generic update_engine TEST=sudo cat /build/amd64-generic/tmp/portage/chromeos-base/update_engine-9999/temp/asan_logs/asan.10 | asan_symbolize.py -s /build/amd64-generic -d > /tmp/asan.log Change-Id: I88f0a86686830553fea150d0188b2851753c2f94 Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/1796613 Tested-by: Jae Hoon Kim <kimjae@chromium.org> Reviewed-by: Amin Hassani <ahassani@chromium.org> Commit-Queue: Jae Hoon Kim <kimjae@chromium.org>
Diffstat (limited to 'scripts/update_payload/test_utils.py')
0 files changed, 0 insertions, 0 deletions