This is an archive of the discontinued LLVM Phabricator instance.

[ASan] Restrict the set of flags overriden at activation.
ClosedPublic

Authored by samsonov on Dec 17 2014, 11:59 AM.

Details

Summary

Change the way ASan flag parsing is performed at activation: instead
of overwriting all ASan and common flags from the activation string,
ASan will now only override a handful of whitelisted flags.
This is a first step towards making runtime flags immutable after
initialization. I plan to re-factor the activation stragegy to
the following one:

  • Parse commandline flags. Override the defaults from compile definition, env var, etc. Flags are immutable at this point.
  • Initiailize the runtime from commandline flags.
  • If ASan needs to be started deactivated, stash the runtime state in "asan_deactivated_flags" and deactivate the runtime.
  • When ASan is activated, override "asan_deactivated_flags" with activation flags, and use it to re-activate the runtime.

Diff Detail

Repository
rL LLVM

Event Timeline

samsonov updated this revision to Diff 17408.Dec 17 2014, 11:59 AM
samsonov retitled this revision from to [ASan] Restrict the set of flags overriden at activation..
samsonov updated this object.
samsonov edited the test plan for this revision. (Show Details)
samsonov added reviewers: eugenis, kcc.
samsonov added a subscriber: Unknown Object (MLST).
eugenis accepted this revision.Dec 19 2014, 2:24 AM
eugenis edited edge metadata.

LGTM

This revision is now accepted and ready to land.Dec 19 2014, 2:24 AM
This revision was automatically updated to reflect the committed changes.