Handle promotion failures when scavenging a WEAK (#11108)
authorTakano Akio <tak@anoak.io>
Wed, 11 May 2016 12:45:29 +0000 (14:45 +0200)
committerBen Gamari <ben@smart-cactus.org>
Wed, 11 May 2016 13:23:46 +0000 (15:23 +0200)
commit0e12124320f0e09a56813fe6361e61043667db53
tree23130296d0fd376d4fa459b98f9a658e5c7661ec
parent046f3a0700c3448d7425b754e40432898cd1dc38
Handle promotion failures when scavenging a WEAK (#11108)

Previously, we ignored promotion failures when evacuating fields of
a WEAK object. When a failure happens, this resulted in an WEAK object
pointing to another object in a younger generation, causing crashes.

I used the test case from #11746 to check that the fix is working.
However I haven't managed to produce a test case that quickly reproduces
the issue.

Test Plan: ./validate

Reviewers: austin, bgamari, simonmar

Reviewed By: simonmar

Subscribers: thomie

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

GHC Trac Issues: #11108

(cherry picked from commit 9363f04d0ff22f3d898af35bb5432c4287e6dc9a)
rts/sm/MarkWeak.c
rts/sm/MarkWeak.h
rts/sm/Scav.c