Page MenuHomePhabricator

[RS4GC] Check that GC pointers are non-integral

Authored by tolziplohu on Jun 4 2021, 7:28 PM.



As discussed in, input to the RewriteStatepointsForGC pass is only valid if the address space used for GC pointers is specified as non-integral.
This patch makes the RS4GC pass actually check this, and produce a fatal error if it isn't the case.

Exactly one of the existing tests for RS4GC actually marked address space 1 as non-integral, so I updated the rest of them to do that.
That actually means that previously, optimization passes could perform invalid optimizations on the test cases had they been run, so it could have been a latent soundness issue.

This patch hardcodes address space 1 as marking GC pointers.
Theoretically it should be configurable, but it was already hardcoded in other places so another patch is still needed to support that.

Diff Detail

Event Timeline

tolziplohu created this revision.Jun 4 2021, 7:28 PM
tolziplohu requested review of this revision.Jun 4 2021, 7:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2021, 7:28 PM
tolziplohu updated this revision to Diff 350082.EditedJun 5 2021, 3:41 PM

Reformat following clang-format's suggestions

Update for newly allowed non-integral inttoptr

tolziplohu edited the summary of this revision. (Show Details)Jun 30 2021, 2:11 PM
reames accepted this revision.Jul 6 2021, 11:37 AM


This revision is now accepted and ready to land.Jul 6 2021, 11:37 AM