Ömer Sinan Ağacan <omeraga...@gmail.com> writes:

> Right, I think that's the problem. We then pass the same "size" to
> scavenge_large_bitmap as the size of the bitmap. So we assume size of the 
> bitmap
> is pap->n_args.
>
> So the call stack is
>
> - scavenge_PAP, calls scavenge_PAP_payload with pap->n_args as "size"
> - scavenge_PAP_payload, calls scavenge_large_bitmap with "size" (== 
> pap->n_args)
>   as the bitmap's size
>
> Is this expected?
>
Omer and I discussed this via IRC.

I believe that the intent here is that scavenge_PAP_payload scavenges
precisely the number of arguments that the PAP's stack fragment
includes, using the function's bitmap to do so (since we must know which
of this arguments are pointers).

Moreover, we know that pap->n_args is less or equal to than the size of
the bitmap (since otherwise this wouldn't be a partial application).
Consequently this is safe and correct.

Cheers,

- Ben

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to