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: Mark H Weaver
Subject: Re: smob mark functions in 2.0
Date: Wed, 30 Nov 2011 10:29:26 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux)

Andy Wingo <address@hidden> writes:
> Specifically, there is a warning in gc/gc_mark.h:
>
>     /* WARNING: Such a mark procedure may be invoked on an unused object    */
>     /* residing on a free list.  Such objects are cleared, except for a     */
>     /* free list link field in the first word.  Thus mark procedures may    */
>     /* not count on the presence of a type descriptor, and must handle this */
>     /* case correctly somehow.                                              */
>
> So, your mark function might see freed objects.

How can this happen?  If you are marking an object, then presumably it
is still reachable, and therefore the objects it references are also
still reachable.  If any of those reachable objects has been freed,
isn't that already a bug of a different kind?  What am I missing?

   Thanks,
     Mark



reply via email to

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