Make finalizers more reliable.
authorTamar Christina <tamar@zhox.com>
Wed, 16 May 2018 01:20:45 +0000 (21:20 -0400)
committerBen Gamari <ben@smart-cactus.org>
Wed, 16 May 2018 12:41:36 +0000 (08:41 -0400)
commit01bb17fd4dc6d92cf08632bbb62656428db6e7fa
tree240bb0a1ebb052108c110b0e4beb7cfe3b004d7b
parent838b69032566ce6ab3918d70e8d5e098d0bcee02
Make finalizers more reliable.

Ignore any errors thrown by finalizers when running them.

This prevents a faulty finalizer from stopping the rest being called.

Test Plan: ./validate, new test T13167

Reviewers: hvr, bgamari, simonmar

Reviewed By: bgamari, simonmar

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #13167

Differential Revision: https://phabricator.haskell.org/D4693
libraries/base/GHC/Weak.hs
libraries/base/tests/T13167.hs [new file with mode: 0644]
libraries/base/tests/T13167.stdout [new file with mode: 0644]
libraries/base/tests/all.T