llvm-project/compiler-rt
Kostya Kortchinsky 0ce4999002 [scudo] Change aligned alloc functions to be more compliant & perf changes
Summary:
We were not following the `man` documented behaviors for invalid arguments to
`memalign` and associated functions. Using `CHECK` for those was a bit extreme,
so we relax the behavior to return null pointers as expected when this happens.
Adapt the associated test.

I am using this change also to change a few more minor performance improvements:
- mark as `UNLIKELY` a bunch of unlikely conditions;
- the current `CHECK` in `__sanitizer::RoundUpTo` is redundant for us in *all*
  calls. So I am introducing our own version without said `CHECK`.
- change our combined allocator `GetActuallyAllocatedSize`. We already know if
  the pointer is from the Primary or Secondary, so the `PointerIsMine` check is
  redundant as well, and costly for the 32-bit Primary. So we get the size by
  directly using the available Primary functions.

Finally, change a `int` to `uptr` to avoid a warning/error when compiling on
Android.

Reviewers: alekseyshl

Reviewed By: alekseyshl

Subscribers: llvm-commits

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

llvm-svn: 306698
2017-06-29 16:45:20 +00:00
..
cmake [scudo] Enabling MIPS support for Scudo 2017-06-19 11:28:59 +00:00
docs [sanitizers] Make it possible to XFAIL on the effective target, not just the default. 2016-08-09 11:50:53 +00:00
include [XRay][compiler-rt][NFC] Add a name for argument to __xray_set_handler_arg1(...) 2017-06-19 01:30:04 +00:00
lib [scudo] Change aligned alloc functions to be more compliant & perf changes 2017-06-29 16:45:20 +00:00
test [scudo] Change aligned alloc functions to be more compliant & perf changes 2017-06-29 16:45:20 +00:00
unittests Add missing import 2017-04-07 01:24:48 +00:00
www Update references to new lists.llvm.org mailing lists. 2015-08-05 03:58:00 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.gitignore
CMakeLists.txt Call cmake_minimum_required at the top of CMakeLists.txt 2017-06-16 21:14:45 +00:00
CODE_OWNERS.TXT [sanitizers] remove earthdok@ from owners 2016-05-18 18:52:18 +00:00
CREDITS.TXT
LICENSE.TXT Update copyright year to 2016. 2016-03-30 22:38:50 +00:00
README.txt

README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================