rts: Reset STATIC_LINK field of reverted CAFs

Authored by bgamari on Jun 18 2019, 11:07 AM.

Description

rts: Reset STATIC_LINK field of reverted CAFs

When we revert a CAF we must reset the STATIC_LINK field lest the GC
might ignore the CAF (e.g. as it carries the STATIC_FLAG_LIST flag) and
will consequently overlook references to object code that we are trying
to unload. This would result in the reachable object code being
unloaded. See Note [CAF lists] and Note [STATIC_LINK fields].

This fixes Trac #16842.

Idea-due-to: Phuong Trinh <lolotp@fb.com>
(cherry picked from commit 2a960c3a04afcfcdb25a13e9a6e65c94c22a169f)

Details

Committed
bgamariWed, Jun 26, 12:46 PM
Parents
rGHC4d8a7206b3d8: Don't eta-expand unsaturated primops
Branches
Unknown
Tags
Unknown