This is an archive of the discontinued LLVM Phabricator instance.

[ubsan] Version names of handlers
AbandonedPublic

Authored by filcab on Jun 13 2016, 7:28 AM.

Details

Summary

This patch introduces a simple way to bump of all the handlers in UBSan.
This way, we can easily break backwards compatibility without it being
confusing for users (a bit like the ASan
__asan_version_mismatch_check_vX symbol), since they'll get undefined
references when linking, instead of random checks providing invalid
information.

I chose to version all symbols at once (instead of just changing version
for one or two) since it avoids us needing to do lookups every time we
emit any check.

I haven't measured slowdown in a potential patch where we only rev the
checks we need, though.

This patch includes two commits: Adding an empty version string + bumping it to
_v2.

There's other alternatives of doing versions, but this one is simple,
efficient (enough), and will forcefully break with old object files (which is a
good thing). Bike-shed away anyway :-)

Before I land this diff, I want to redo D19667+D19668 on top of it. Then I can
commit them quickly so we're able to only rev up UBSan once, instead of having
an intermediary v2, and then bump to v3 immediately. If anyone would prefer a
more split up method I don't mind doing them separately, one at a time (they'll
always be different commits with both methods).

Diff Detail

Event Timeline

filcab updated this revision to Diff 60520.Jun 13 2016, 7:28 AM
filcab retitled this revision from to [ubsan] Version names of handlers.
filcab updated this object.
filcab added reviewers: kcc, samsonov, rsmith.
filcab added a subscriber: cfe-commits.