[PATCH] D63831: [scudo][standalone] Introduce the C & C++ wrappers [fixed]

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 26 11:13:10 PDT 2019


cryptoad created this revision.
cryptoad added reviewers: morehouse, hctim, eugenis, vitalybuka, dyung, hans.
Herald added subscribers: Sanitizers, jfb, delcypher, mgorny, srhines.
Herald added projects: LLVM, Sanitizers.

This is a redo of D63612 <https://reviews.llvm.org/D63612>.

Two problems came up on some bots:

- `__builtin_umull_overflow` was not declared. This is likely due to an older clang or gcc, so add a guard with `__has_builtin` and fallback to a division in the event the builtin doesn't exist;
- contradicting definition for `malloc`, etc. This is AFAIU due to the fact that we ended up transitively including `stdlib.h` in the `.inc` due to it being the flags parser header: so move the include to the cc instead.

This should fix the issues, but since those didn't come up in my local
tests it's mostly guesswork.

Rest is the same!


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D63831

Files:
  lib/scudo/standalone/CMakeLists.txt
  lib/scudo/standalone/flags_parser.cc
  lib/scudo/standalone/flags_parser.h
  lib/scudo/standalone/tests/CMakeLists.txt
  lib/scudo/standalone/tests/wrappers_c_test.cc
  lib/scudo/standalone/tests/wrappers_cpp_test.cc
  lib/scudo/standalone/tsd.h
  lib/scudo/standalone/wrappers_c.cc
  lib/scudo/standalone/wrappers_c.h
  lib/scudo/standalone/wrappers_c.inc
  lib/scudo/standalone/wrappers_c_bionic.cc
  lib/scudo/standalone/wrappers_c_checks.h
  lib/scudo/standalone/wrappers_cpp.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63831.206712.patch
Type: text/x-patch
Size: 35367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190626/fed195b2/attachment-0001.bin>


More information about the llvm-commits mailing list