This is an archive of the discontinued LLVM Phabricator instance.

Make sure that not interesting allocas are not instrumented.
ClosedPublic

Authored by vitalybuka on Jun 9 2016, 3:17 PM.

Details

Summary

We failed to unpoison uninteresting allocas on return as unpoisoning is part of
main instrumentation which skips such allocas.

Added check -asan-instrument-allocas for dynamic allocas. If instrumentation of
dynamic allocas is disabled it will not will not be unpoisoned.

PR27453

Diff Detail

Event Timeline

vitalybuka updated this revision to Diff 60255.Jun 9 2016, 3:17 PM
vitalybuka retitled this revision from to Make sure that not interesting allocas are not instrumented..
vitalybuka updated this object.
vitalybuka added reviewers: kcc, eugenis.
vitalybuka added a subscriber: llvm-commits.
vitalybuka updated this revision to Diff 60265.Jun 9 2016, 3:47 PM

test for zero sized alloc

kcc added inline comments.Jun 9 2016, 4:19 PM
lib/Transforms/Instrumentation/AddressSanitizer.cpp
1994

std::find inside assert may potentially make the assert build much slower than a non-assert.
I'd prefer if we could avoid it.

vitalybuka updated this revision to Diff 60275.Jun 9 2016, 4:32 PM

Remove complex assert.

vitalybuka marked an inline comment as done.Jun 9 2016, 4:33 PM
kcc accepted this revision.Jun 9 2016, 4:38 PM
kcc edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jun 9 2016, 4:38 PM
This revision was automatically updated to reflect the committed changes.