This is an archive of the discontinued LLVM Phabricator instance.

[Verifier] Check byval/etc type when comparing ABI attributes
ClosedPublic

Authored by nikic on Jul 12 2021, 1:35 PM.

Details

Summary

For musttail calls, ABI attributes between the function and the musttail call must match. The current check discards the type of type attribute like byval, which means that it will consider byval(i32) and byval(i64) (or similar) as compatible.

I assume this is a leftover from before these attributes had a type argument. Ran into this while trying to tighten an assertion in AttrBuilder.

Diff Detail

Event Timeline

nikic created this revision.Jul 12 2021, 1:35 PM
nikic requested review of this revision.Jul 12 2021, 1:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2021, 1:35 PM
rnk accepted this revision.Jul 19 2021, 3:45 PM

lgtm

Yes, attempting to actually execute such a tail call would probably crash.

This revision is now accepted and ready to land.Jul 19 2021, 3:45 PM
This revision was landed with ongoing or failed builds.Jul 20 2021, 11:19 AM
This revision was automatically updated to reflect the committed changes.