summaryrefslogtreecommitdiff
path: root/base/errors_unix.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2017-04-17 12:46:12 -0700
committerMark Salyzyn <salyzyn@google.com>2017-04-18 07:24:41 -0700
commit9decb90e8c445d775a908f9282b8e58fe3f5ae07 (patch)
tree7bcc3f567dc9282501d2b69f5343027c18a0ff2f /base/errors_unix.cpp
parent219ef270a6907f4310bc1640ac404707c5a6ecc4 (diff)
logd: iterator corruption paranoia
(cherry pick from commit 3614a0c5d4aec84fbc5f6cbf1e919e8b3825b818) Add checking for impossible(tm) scenarios within LogBuffer::flushTo: 1) When iterating through the log entries, check if the iterator returns two identical element references and break out of the loop. 2) Cap the maximum number of log entries we will skip while holding the iterator lock at 4194304, break out of the loop. We print a message to the kernel logs if we hit these cases. ToDo: Remove this paranoia at some future date. Test: gTest liblog-unit-tests logcat-unit-tests and logd-unit-tests Bug: 37378309 Change-Id: I789594649db14093238828b9f6d1daeca8b780c2
Diffstat (limited to 'base/errors_unix.cpp')
0 files changed, 0 insertions, 0 deletions