This is an archive of the discontinued LLVM Phabricator instance.

[asan] add option to set shadow mapping offset
ClosedPublic

Authored by aaronc on Apr 7 2016, 1:21 PM.

Details

Summary

Allowing overriding the default ASAN shadow mapping offset with the` -asan-shadow-offset` option, and allow zero to be specified for both offset and scale. This is useful for bootstrapping or stand-alone ASAN implementations.

Diff Detail

Event Timeline

aaronc updated this revision to Diff 52949.Apr 7 2016, 1:21 PM
aaronc retitled this revision from to [asan] add option to set shadow mapping offset.
aaronc updated this object.
aaronc added reviewers: kcc, zaks.anna, rgov.
rgov accepted this revision.Apr 7 2016, 2:31 PM
rgov edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Apr 7 2016, 2:31 PM
kcc edited edge metadata.Apr 14 2016, 1:14 PM

Please add a test

lib/Transforms/Instrumentation/AddressSanitizer.cpp
210

Please add something like "only for experiments, not fully supported" to the cl::desc

410

What would be the meaning of scale = 0?

aaronc updated this revision to Diff 55117.Apr 26 2016, 4:22 PM
aaronc edited edge metadata.
aaronc marked an inline comment as done.

Added experimental warning to mapping-offset option, and add unit test.

kcc accepted this revision.Apr 26 2016, 6:03 PM
kcc edited edge metadata.

LGTM

aaronc edited edge metadata.May 2 2016, 1:36 PM
aaronc added a subscriber: llvm-commits.
aaronc updated this revision to Diff 55895.May 2 2016, 2:11 PM

Missed llvm-commits@. Resending with same diff.

filcab added a subscriber: filcab.May 3 2016, 8:14 AM

This was removed back in r202033 by Kostya.
It's mostly only useful when starting to port ASan, AFAICT.

I'm curious, what do you mean with "stand-alone ASAN implementations"?

Thank you,

Filipe

rgov added a comment.May 4 2016, 6:22 PM

Committed as r268586. git-svn lost the authorship information, sorry Aaron!

rgov closed this revision.May 4 2016, 6:23 PM
rgov added a comment.May 4 2016, 6:34 PM

Not sure if I can re-open the revision. We got a failure on one of the PS4 buildbots:

opt: for the -asan-mapping-offset option: Cannot find option named '0xdeadbeef'!
FileCheck error: '-' is empty.