DescriptionAdd memory corruption checking to base::File().
Since we crash on invalid fd in ScopedFD::Close(), memory corruption
in a base::File() object can cause crashes; perhaps long after the memory
is actually corrupt.
This CL puts a checksum in memory near the fd on POSIX systems. The
checksum is different enough to be very unlikely to be correct after a
random memory write, but also very cheap to compute, so we can have
most operations on a file double quickly double check its integrity,
for earlier (and more useful for debugging) crashes.
This is intended to help us debug issue 424562. Once we have found out
if and where memory is being corrupted, this instrumentation code should
be removed.
R=thakis@chromium.org,pasko@chromium.org
BUG=424562
Committed: https://crrev.com/32ea7f9a9a2385bd8911bf5bc37748a560a387d5
Cr-Commit-Position: refs/heads/master@{#303251}
Patch Set 1 #Patch Set 2 : self review #Patch Set 3 : rebase to master #
Total comments: 6
Patch Set 4 : remediate #Patch Set 5 : build fix; ignore correctly #
Total comments: 2
Patch Set 6 : final comment fixup #
Total comments: 2
Messages
Total messages: 13 (2 generated)
|