summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common
diff options
context:
space:
mode:
authorAlex Shlyapnikov <alekseys@google.com>2017-10-25 17:21:37 +0000
committerAlex Shlyapnikov <alekseys@google.com>2017-10-25 17:21:37 +0000
commit00b60424097c569e185a667969d054db7004cd0c (patch)
treee94a6e5fe38a23292c64e7d8fc52423b5bc4c00c /lib/sanitizer_common
parent16cd8b12c079582001d7adc5e25de51927a79463 (diff)
[Sanitizers] ASan: detect new/delete calls with mismatched alignment.
ASan allocator stores the requested alignment for new and new[] calls and on delete and delete[] verifies that alignments do match. The representable alignments are: default alignment, 8, 16, 32, 64, 128, 256 and 512 bytes. Alignments > 512 are stored as 512, hence two different alignments > 512 will pass the check (possibly masking the bug), but limited memory requirements deemed to be a resonable tradeoff for relaxed conditions. The feature is controlled by new_delete_type_mismatch flag, the same one protecting new/delete matching size check. Differential revision: https://reviews.llvm.org/D38574 Issue: https://github.com/google/sanitizers/issues/799 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@316595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common')
0 files changed, 0 insertions, 0 deletions