[PATCH] D48199: [scudo] Add verbose failures in place of CHECK(0)

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 14 14:31:06 PDT 2018


cryptoad created this revision.
cryptoad added a reviewer: alekseyshl.
Herald added subscribers: Sanitizers, delcypher, mgorny.

The current `FailureHandler` mechanism was fairly opaque with regard to the
failure reason due to using `CHECK(0)`. Scudo is a bit different from the other
Sanitizers as it prefers to avoid spurious processing in its failure path. So
we just `dieWithMessage` using a somewhat explicit string.

Adapted the tests for the new strings.

While this takes care of the `OnBadRequest` & `OnOOM` failures, the next step
is probably to migrate the other Scudo failures in the same failes (header
corruption, invalid state and so on).


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D48199

Files:
  lib/scudo/CMakeLists.txt
  lib/scudo/scudo_allocator.cpp
  lib/scudo/scudo_allocator_secondary.h
  lib/scudo/scudo_errors.cpp
  lib/scudo/scudo_errors.h
  lib/scudo/scudo_new_delete.cpp
  test/scudo/aligned-new.cpp
  test/scudo/memalign.c
  test/scudo/sizes.cpp
  test/scudo/valloc.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48199.151427.patch
Type: text/x-patch
Size: 16898 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180614/7d6a24cd/attachment.bin>


More information about the llvm-commits mailing list