guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: smob mark functions in 2.0


From: Ludovic Courtès
Subject: Re: smob mark functions in 2.0
Date: Fri, 25 Nov 2011 00:24:11 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux)

Hi,

Andy Wingo <address@hidden> skribis:

> On Thu 24 Nov 2011 00:12, address@hidden (Ludovic Courtès) writes:
>
>>> So, your mark function might see freed objects.  This is terrible, but
>>> it is the way that it is.  The key is that, if you touch a Scheme object
>>> in your mark function, to first do a check on that object, to see that
>>> it is valid.  You can check the TC bits of the first word, or otherwise
>>> check that other words are non-NULL.
>>
>> What about making that check in libguile before invoking the user’s mark
>> function?
>
> Yes, we do that.  I think you wrote that code!

Yes, when I was young.  ;-)

> The problem was in a mark function, accessing *other* Scheme objects.

Oh, right.

Anyway, users are encouraged to #ifdef out mark functions when using
Guile 2.0.

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]