[PATCH] D54590: [compiler-rt][UBSan] Sanitization for alignment assumptions.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 16 14:31:01 PST 2018


lebedev.ri updated this revision to Diff 174452.
lebedev.ri added a comment.

Adapt with the actual pointer no longer being provided, compute it by subtracting the offset.
While there, also display the misalignment offest (the result of the `real pointer  &  aligment mask`).


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D54590

Files:
  lib/ubsan/ubsan_checks.inc
  lib/ubsan/ubsan_handlers.cc
  lib/ubsan/ubsan_handlers.h
  lib/ubsan_minimal/ubsan_minimal_handlers.cc
  test/fuzzer/AlignmentAssumptionTest.cpp
  test/fuzzer/fuzzer-alignment-assumption.test
  test/ubsan/TestCases/Pointer/alignment-assumption-attribute-align_value-on-lvalue.cpp
  test/ubsan/TestCases/Pointer/alignment-assumption-attribute-align_value-on-paramvar.cpp
  test/ubsan/TestCases/Pointer/alignment-assumption-attribute-alloc_align-on-function-variable.cpp
  test/ubsan/TestCases/Pointer/alignment-assumption-attribute-alloc_align-on-function.cpp
  test/ubsan/TestCases/Pointer/alignment-assumption-attribute-assume_aligned-on-function-two-params.cpp
  test/ubsan/TestCases/Pointer/alignment-assumption-attribute-assume_aligned-on-function.cpp
  test/ubsan/TestCases/Pointer/alignment-assumption-blacklist.cpp
  test/ubsan/TestCases/Pointer/alignment-assumption-builtin_assume_aligned-three-params-variable.cpp
  test/ubsan/TestCases/Pointer/alignment-assumption-builtin_assume_aligned-three-params.cpp
  test/ubsan/TestCases/Pointer/alignment-assumption-builtin_assume_aligned-two-params.cpp
  test/ubsan/TestCases/Pointer/alignment-assumption-openmp.cpp
  test/ubsan/TestCases/Pointer/alignment-assumption-summary.cpp
  test/ubsan_minimal/TestCases/alignment-assumption.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54590.174452.patch
Type: text/x-patch
Size: 32769 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181116/52f129df/attachment.bin>


More information about the llvm-commits mailing list