This is an archive of the discontinued LLVM Phabricator instance.

[ubsan] Disable the object-size check at -O0
ClosedPublic

Authored by vsk on Jun 23 2017, 11:51 AM.

Details

Summary

This is motivated by the thread:
[cfe-dev] Disabling ubsan's object size check at -O0

I think the driver is the best place to disable a sanitizer check at particular optimization levels. Doing so in the frontend is messy, and makes it really hard to test IR generation for the check. Making the change in CodeGen has the same issues.

Diff Detail

Repository
rL LLVM

Event Timeline

vsk created this revision.Jun 23 2017, 11:51 AM
vsk updated this revision to Diff 103778.Jun 23 2017, 2:44 PM

Add a diagnostic for users who explicitly turn the object-size check on at -O0, and tighten up the test a bit.

This revision was automatically updated to reflect the committed changes.