Go to file
Kostya Kortchinsky 43917720a7 [scudo] Application & platform compatibility changes
Summary:
This patch changes a few (small) things around for compatibility purposes for
the current Android & Fuchsia work:
- `realloc`'ing some memory that was not allocated with `malloc`, `calloc` or
  `realloc`, while UB according to http://pubs.opengroup.org/onlinepubs/009695399/functions/realloc.html
  is more common that one would think. We now only check this if
  `DeallocationTypeMismatch` is set; change the "mismatch" error
  messages to be more homogeneous;
- some sketchily written but widely used libraries expect a call to `realloc`
  to copy the usable size of the old chunk to the new one instead of the
  requested size. We have to begrundingly abide by this de-facto standard.
  This doesn't seem to impact security either way, unless someone comes up with
  something we didn't think about;
- the CRC32 intrinsics for 64-bit take a 64-bit first argument. This is
  misleading as the upper 32 bits end up being ignored. This was also raising
  `-Wconversion` errors. Change things to take a `u32` as first argument.
  This also means we were (and are) only using 32 bits of the Cookie - not a
  big thing, but worth mentioning.
- Includes-wise: prefer `stddef.h` to `cstddef`, move `scudo_flags.h` where it
  is actually needed.
- Add tests for the memalign-realloc case, and the realloc-usable-size one.

(Edited typos)

Reviewers: alekseyshl

Reviewed By: alekseyshl

Subscribers: llvm-commits

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

llvm-svn: 311018
2017-08-16 16:40:48 +00:00
clang [OPENMP] Fix for PR28581: OpenMP linear clause - wrong results. 2017-08-16 15:58:46 +00:00
clang-tools-extra [clang-tidy] Add a close-on-exec check on inotify_init1() in Android module. 2017-08-14 17:45:48 +00:00
compiler-rt [scudo] Application & platform compatibility changes 2017-08-16 16:40:48 +00:00
debuginfo-tests Add a test for PR33166. 2017-05-25 19:33:16 +00:00
libclc configure.py: Drop explicit import of int builtin 2017-08-15 22:24:05 +00:00
libcxx [libcxx] [test] Rename _Up to U, etc. NFCI. 2017-08-11 20:54:09 +00:00
libcxxabi [demangler] Fix some more -Wshadow warnings I missed in r310535 2017-08-10 02:48:13 +00:00
libunwind [CMake] Allow overriding lib dir suffix independently from LLVM 2017-08-08 00:37:59 +00:00
lld [ELF/LTO] -function-sections/-data-sections are exact options. 2017-08-16 08:21:04 +00:00
lldb convert hard tabs to spaces in PlatformOpenBSD.cpp 2017-08-16 13:10:07 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm AMDGPU/NFC: Sort files in CMakeLists.txt alphabetically 2017-08-16 16:23:32 +00:00
openmp [OpenMP] libomptarget: move debugging dumps under control of env var LIBOMPTARGET_DEBUG 2017-08-14 15:09:59 +00:00
parallel-libs
polly [ScopInfo] Clarify comment. NFC. 2017-08-16 09:28:02 +00:00