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>

Details

Committed
Marge Bot <ben+marge-bot@smart-cactus.org>Sat, Jun 22, 9:06 AM
Parents
rGHC22e721c10e37: testsuite: Mark T5611 as broken in ghci way
Branches
Unknown
Tags
Unknown
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHCb0d6bf2a34d5: rts: Reset STATIC_LINK field of reverted CAFs (authored by bgamari).Sat, Jun 22, 9:06 AM