[scudo][standalone] Introduce the chunk header
authorKostya Kortchinsky <kostyak@google.com>
Wed, 8 May 2019 21:54:02 +0000 (21:54 +0000)
committerKostya Kortchinsky <kostyak@google.com>
Wed, 8 May 2019 21:54:02 +0000 (21:54 +0000)
commit6a85631d8713d778fc2cc7c55b3161e5283701dc
treea1abe3aba4f4278b8414ff92c516cf526df47dd3
parente17a0d3e64890a9a37207e3a3762367889ef2df5
[scudo][standalone] Introduce the chunk header

Summary:
... and its related functions.

The structure and its functionalities are identical to existing ones.
The header stores information on a `scudo::Chunk` to be able to detect
inconsitencies or potential corruption attempts. It is checksummed for
that purpose.

Reviewers: morehouse, eugenis, vitalybuka, hctim

Reviewed By: vitalybuka

Subscribers: mgorny, delcypher, jfb, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

Differential Revision: https://reviews.llvm.org/D61654

llvm-svn: 360290
compiler-rt/lib/scudo/standalone/CMakeLists.txt
compiler-rt/lib/scudo/standalone/checksum.cc
compiler-rt/lib/scudo/standalone/checksum.h
compiler-rt/lib/scudo/standalone/chunk.h [new file with mode: 0644]
compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt
compiler-rt/lib/scudo/standalone/tests/chunk_test.cc [new file with mode: 0644]