This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Allow options to be defined at compile time
ClosedPublic

Authored by cryptoad on Feb 6 2018, 11:07 AM.

Details

Summary

Allow for options to be defined at compile time, like is already the case for
other sanitizers, via SCUDO_DEFAULT_OPTIONS.

Diff Detail

Event Timeline

cryptoad created this revision.Feb 6 2018, 11:07 AM
Herald added subscribers: Restricted Project, delcypher. · View Herald TranscriptFeb 6 2018, 11:07 AM
alekseyshl accepted this revision.Feb 6 2018, 3:30 PM
alekseyshl added inline comments.
lib/scudo/scudo_flags.cpp
40

Remove this extraneous comment.

43

Totally a nit, but maybe undef SCUDO_STRINGIZE and SCUDO_STRINGIZE_OPTIONS here, as we do with SCUDO_FLAG above?

Maybe it's time to have this definition in common and use it everywhere:
#define SANITIZER_STRINGIFY_(S) #S
#define SANITIZER_STRINGIFY(S) SANITIZER_STRINGIFY_(S)

This revision is now accepted and ready to land.Feb 6 2018, 3:30 PM
cryptoad planned changes to this revision.Feb 6 2018, 3:37 PM
cryptoad added inline comments.
lib/scudo/scudo_flags.cpp
43

I'm going to move it to common.
Current users of the macro would be ASan (flags), XRay (flags), Scudo (flags) and TSan (setjmp symbols).

cryptoad updated this revision to Diff 133226.Feb 7 2018, 8:53 AM
cryptoad marked 3 inline comments as done.

Introduce a SANITIZER_STRINGIFY macro in sanitizer_internal_defs.h, used
by the various flags parsers (ASan, Scudo, XRay).

This revision is now accepted and ready to land.Feb 7 2018, 8:53 AM
cryptoad requested review of this revision.Feb 7 2018, 1:09 PM

What about TSan setjmp?

lib/asan/asan_flags.cc
35–36

Remove this comment.

cryptoad updated this revision to Diff 133313.EditedFeb 7 2018, 2:39 PM
cryptoad marked an inline comment as done.

Replace TSAN_STRING_SETJMP__ (forgotten on the first go).
Removed an extraneous comment.

Edit: wrong macro name.

dberris accepted this revision.Feb 7 2018, 3:06 PM

LGTM for XRay.

This revision is now accepted and ready to land.Feb 7 2018, 3:06 PM
alekseyshl accepted this revision.Feb 7 2018, 3:25 PM
This revision was automatically updated to reflect the committed changes.