Don't shortcut SRTs for static functions (#15544)
authorSimon Marlow <marlowsd@gmail.com>
Tue, 18 Sep 2018 15:47:56 +0000 (11:47 -0400)
committerBen Gamari <ben@smart-cactus.org>
Tue, 18 Sep 2018 15:49:05 +0000 (11:49 -0400)
commit28356f217fe4d314bd5a4f0316b5bced755cbb2f
tree4d2c8b7060d97f487aaa3f363916e8aad186d343
parentf442bc6c966e85f845a8167ab97ab71d73cd8520
Don't shortcut SRTs for static functions (#15544)

Shortcutting the SRT for a static function can lead to resurrecting a
static object at runtime, which violates assumptions in the GC. See
comments for details.

Test Plan:
- manual testing (in progress)
- validate

Reviewers: osa1, bgamari, erikd

Reviewed By: bgamari

Subscribers: rwbarton, carter

GHC Trac Issues: #15544

Differential Revision: https://phabricator.haskell.org/D5145

(cherry picked from commit a324dfdf3b505ea30d134dc8183d7b4bb441ced4)
compiler/cmm/CmmBuildInfoTables.hs