[Vm-dev] GC | Strong or weak reference to arguments on stack?

Eliot Miranda eliot.miranda at gmail.com
Wed Aug 18 15:59:00 UTC 2021

Hi Marcel,

> On Aug 18, 2021, at 5:25 AM, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:
> Hi all!
> I kind of thought that objects sitting as arguments on active stack frames form strong references.

Indeed they must.

> Yet, I have a kind of flaky callback test that raises doubts about this assumption.
> Here is an example:
>   lib qsort: array compare: [:a :b | (a - b) sign].

The block being nil inside the callback could imply that the lookup from thunk address to block yielded nil and be nothing to do with the stack no?

> Maybe it is some interference with GC and FFI callbacks ... Hmm... Anyway, sometimes, the block closure is already "nil" inside the callback when its time to evaluate... But mostly it works fine. :-)

I can’t see what you’ve posted below.  If displays as a white region.  Can you post the stack?  What’s the actual error message? If you look down the stack where does the nil block originate?


Mysterious ;-)

> Best,
> Marcel

_,,,^..^,,,_ (phone)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20210818/fb9def18/attachment.html>

More information about the Vm-dev mailing list