llvm-project/compiler-rt/lib
Kostya Kortchinsky 1148dc5274 [scudo] 32-bit and hardware agnostic support
Summary:
This update introduces i386 support for the Scudo Hardened Allocator, and
offers software alternatives for functions that used to require hardware
specific instruction sets. This should make porting to new architectures
easier.

Among the changes:
- The chunk header has been changed to accomodate the size limitations
  encountered on 32-bit architectures. We now fit everything in 64-bit. This
  was achieved by storing the amount of unused bytes in an allocation rather
  than the size itself, as one can be deduced from the other with the help
  of the GetActuallyAllocatedSize function. As it turns out, this header can
  be used for both 64 and 32 bit, and as such we dropped the requirement for
  the 128-bit compare and exchange instruction support (cmpxchg16b).
- Add 32-bit support for the checksum and the PRNG functions: if the SSE 4.2
  instruction set is supported, use the 32-bit CRC32 instruction, and in the
  XorShift128, use a 32-bit based state instead of 64-bit.
- Add software support for CRC32: if SSE 4.2 is not supported, fallback on a
  software implementation.
- Modify tests that were not 32-bit compliant, and expand them to cover more
  allocation and alignment sizes. The random shuffle test has been deactivated
  for linux-i386 & linux-i686 as the 32-bit sanitizer allocator doesn't
  currently randomize chunks.

Reviewers: alekseyshl, kcc

Subscribers: filcab, llvm-commits, tberghammer, danalbert, srhines, mgorny, modocache

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

llvm-svn: 288255
2016-11-30 17:32:20 +00:00
..
BlocksRuntime Move tests for BlocksRuntime and builtins to corresponding directories under test/ 2014-02-14 09:47:31 +00:00
asan [asan] Avoid redundant poisoning checks in __sanitizer_contiguous_container_find_bad_address. 2016-11-30 09:11:47 +00:00
builtins builtins: switch to c11 from c99 2016-11-29 02:31:40 +00:00
cfi [compiler-rt] Do not introduce __sanitizer namespace globally 2016-09-15 21:02:18 +00:00
dfsan [compiler-rt] Do not introduce __sanitizer namespace globally 2016-09-15 21:02:18 +00:00
esan [esan] Fix ESan test failure on Debian Sid bot 2016-10-07 20:53:35 +00:00
interception [asan] Don't assert that a target is within 2GB on 32-bit Windows 2016-11-15 18:29:17 +00:00
lsan Return memory to OS right after free (not in the async thread). 2016-11-29 00:22:50 +00:00
msan Return memory to OS right after free (not in the async thread). 2016-11-29 00:22:50 +00:00
profile [Profile] Fix value profiler eviction bug 2016-11-29 22:00:54 +00:00
safestack [compiler-rt] Do not introduce __sanitizer namespace globally 2016-09-15 21:02:18 +00:00
sanitizer_common Return memory to OS right after free (not in the async thread). 2016-11-29 00:22:50 +00:00
scudo [scudo] 32-bit and hardware agnostic support 2016-11-30 17:32:20 +00:00
stats stats: define WIN32_LEAN_AND_MEAN when including windows.h 2016-08-30 20:15:46 +00:00
tsan Return memory to OS right after free (not in the async thread). 2016-11-29 00:22:50 +00:00
ubsan [ubsan] More 0 -> nullptr conversions (NFC) 2016-10-06 23:41:57 +00:00
xray Revert "[XRay][compiler-rt] XRay Buffer Queue" 2016-11-25 03:54:45 +00:00
CMakeLists.txt build: allow building a specific set of sanitizers 2016-08-19 15:13:21 +00:00