HomePhabricator

[scudo][standalone] Introduce the C & C++ wrappers [fixed]

Description

[scudo][standalone] Introduce the C & C++ wrappers [fixed]

Summary:
This is a redo of 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!

Reviewers: morehouse, hctim, eugenis, vitalybuka, dyung, hans

Reviewed By: morehouse, dyung, hans

Subscribers: srhines, mgorny, delcypher, jfb, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

Details

Committed
cryptoadJun 27 2019, 7:23 AM
Reviewer
morehouse
Differential Revision
D63831: [scudo][standalone] Introduce the C & C++ wrappers [fixed]
Parents
rL364546: [InstCombine] remove 'tmp' names and regenerate checks; NFC
Branches
Unknown
Tags
Unknown