This is an archive of the discontinued LLVM Phabricator instance.

[sanitizers] Add ASAN support for AArch64 42-bit VMA
ClosedPublic

Authored by zatrazz on Aug 19 2015, 10:14 AM.

Details

Summary

This patch adds support for asan on aarch64-linux with 42-bit VMA
(current default config for 64K pagesize kernels). The support is
enabled by defining the SANITIZER_AARCH64_VMA to 42 at build time
for both clang/llvm and compiler-rt. The default VMA is 39 bits.

The patch is sent along with a compiler-rt one to enable the same
functionality for aarch64. The same compiler flag is used.

Diff Detail

Event Timeline

zatrazz updated this revision to Diff 32568.Aug 19 2015, 10:14 AM
zatrazz retitled this revision from to [sanitizers] Add ASAN support for AArch64 42-bit VMA.
zatrazz updated this object.
zatrazz added a subscriber: llvm-commits.
rengolin added inline comments.Aug 19 2015, 10:29 AM
lib/Transforms/Instrumentation/AddressSanitizer.cpp
87
#elif defined SANITIZER_AARCH64_VMA
#error "Srsly?"
#endif
zatrazz updated this revision to Diff 32588.Aug 19 2015, 11:40 AM

Updated patch with missing default VMA value.

rengolin added inline comments.Aug 19 2015, 11:56 AM
lib/Transforms/Instrumentation/AddressSanitizer.cpp
67

Same comment as in the RT side: make sure that, if the value is defined, it is sane.

zatrazz updated this revision to Diff 32686.Aug 20 2015, 5:28 AM

Updated patch based on comments:

  • Add failsafe check for invalid SANITIZER_AARCH64_VMA values.
rengolin accepted this revision.Aug 20 2015, 5:30 AM
rengolin edited edge metadata.

LGTM, with an additional "(unsupported)" comment after 48.

This revision is now accepted and ready to land.Aug 20 2015, 5:30 AM
zatrazz closed this revision.Aug 21 2015, 6:38 AM