[Haskell-cafe] Bug in GC's ordering of ForeignPtr finalization?

Antoine Latter aslatter at gmail.com
Mon Aug 29 06:03:52 CEST 2011

On Sun, Aug 28, 2011 at 10:47 PM, Ben Gamari <bgamari.foss at gmail.com> wrote:
> On Sun, 28 Aug 2011 22:26:05 -0500, Antoine Latter <aslatter at gmail.com> wrote:
>> One problem you might be running in to is that the optimization passes
>> can notice that a function isn't using all of its arguments, and then
>> it won't pass them. These even applies if the arguments are bound
>> together in a record type.
> In this case I wouldn't be able to reproduce the problem with
> optimization disabled, no? Unfortunately, this is not the case; the
> problem persists even with -O0.

Perhaps? I don't know the details about how the GC decides when
something is reachable. The scenario I described (which sounds similar
to yours?) is only safe in Haskell when using functions like


More information about the Haskell-Cafe mailing list