This is an archive of the discontinued LLVM Phabricator instance.

[LLD][COFF] Reduce the maximum size of the GHASH table
ClosedPublic

Authored by aganea on May 27 2021, 6:56 PM.

Details

Summary

Before this patch, the maximum size of the GHASH table was 2^31 buckets. However we were storing the bucket index into a TypeIndex which has an input limit of (2^31)-4095 indices, see this link. Any value above that limit will improperly set the TypeIndex's high bit, which is interpreted as DecoratedItemIdMask. This used to cause bad indices on extraction when calling TypeIndex::toArrayIndex().

Diff Detail

Event Timeline

aganea requested review of this revision.May 27 2021, 6:56 PM
aganea created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2021, 6:56 PM
rnk accepted this revision.May 27 2021, 7:37 PM

lgtm

This revision is now accepted and ready to land.May 27 2021, 7:37 PM
This revision was automatically updated to reflect the committed changes.