This is an archive of the discontinued LLVM Phabricator instance.

[UBSan] Fix vptr checks on arm64e
ClosedPublic

Authored by yln on Apr 15 2020, 12:09 PM.

Details

Summary

Fix UBSan's vptr checks in the presence of arm64e pointer signing.

Radar-Id: rdar://61786404

Diff Detail

Event Timeline

yln created this revision.Apr 15 2020, 12:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2020, 12:09 PM
Herald added subscribers: Restricted Project, danielkiss, kristof.beyls. · View Herald Transcript
vsk accepted this revision.Apr 15 2020, 2:54 PM

I reviewed this downstream, still lgtm :)

compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-ptrauth-unauthenticated.cpp
24

Could probably use a comment, like "We're hacking the object by putting an unauthenticated vtable ptr into it. This sets up an auth failure when the runtime goes to inspect the vtable"?

This revision is now accepted and ready to land.Apr 15 2020, 2:54 PM
yln updated this revision to Diff 257873.Apr 15 2020, 3:31 PM

Added comment. clang-format test.

yln marked an inline comment as done.Apr 15 2020, 3:34 PM

Thanks Vedant!
I will leave it for another day before landing to give others a chance to chime in.

This revision was automatically updated to reflect the committed changes.