This is an archive of the discontinued LLVM Phabricator instance.

[Blocks] Inherit sanitizer options from parent decl
ClosedPublic

Authored by vsk on Nov 30 2017, 12:15 PM.

Details

Summary

There is no way to apply sanitizer suppressions to ObjC blocks. A
reasonable default is to have blocks inherit their parent's sanitizer
options.

rdar://32769634

Diff Detail

Repository
rC Clang

Event Timeline

vsk created this revision.Nov 30 2017, 12:15 PM
vsk added a comment.Dec 7 2017, 3:51 PM

Friendly ping.

zaks.anna accepted this revision.Dec 7 2017, 6:14 PM

LGTM.

Thanks!

I was wondering if there are other places where this propagation needs to be added, for example, other calls to GenerateBlockFunction.

This revision is now accepted and ready to land.Dec 7 2017, 6:14 PM
vsk added a comment.Dec 7 2017, 6:43 PM

LGTM.

Thanks!

I was wondering if there are other places where this propagation needs to be added, for example, other calls to GenerateBlockFunction.

Thanks for the review :). Yes there is one other site which calls GenerateBlockFunction, but that is done in CodeGenModule, where there are no SanOpts to inherit *except* those from the CGM, which is already the default behavior. (You can apply suppressions to those by specifying "_block_invoke*" in your blacklist.) So I think this is all that's needed.

This revision was automatically updated to reflect the committed changes.