From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.user Subject: Re: smob mark functions in 2.0 Date: Sat, 27 Sep 2014 17:29:02 +0200 Message-ID: <87iok92ibl.fsf@pobox.com> References: <87aa7mmt76.fsf@pobox.com> <87fwh5d3xl.fsf@netris.org> <87tx3vc7d9.fsf@yeeloong.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1411831783 1904 80.91.229.3 (27 Sep 2014 15:29:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Sep 2014 15:29:43 +0000 (UTC) Cc: guile-user To: Mark H Weaver Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Sep 27 17:29:38 2014 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XXtwE-0001ry-FP for guile-user@m.gmane.org; Sat, 27 Sep 2014 17:29:34 +0200 Original-Received: from localhost ([::1]:56184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXtwE-0002pD-2J for guile-user@m.gmane.org; Sat, 27 Sep 2014 11:29:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXtw1-0002jA-Ep for guile-user@gnu.org; Sat, 27 Sep 2014 11:29:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXtvw-0006dD-Qn for guile-user@gnu.org; Sat, 27 Sep 2014 11:29:21 -0400 Original-Received: from sasl.smtp.pobox.com ([208.72.237.25]:61832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXtvw-0006cp-Ko for guile-user@gnu.org; Sat, 27 Sep 2014 11:29:16 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl0.pobox.com (Postfix) with ESMTP id 4882D36DD8; Sat, 27 Sep 2014 11:29:10 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=xH41jbNnBRyNE7VPHTCe0ygQUXg=; b=wYNcTJ eqrJh/AZenBDftj3NrhlLnmRFaTAeNthrj62ny+y1yHizg618PlZ0la7xxs0Nw+z zWAsNl03JsPw4jAf+P+WuKBAi1B4JgLezO0W9D+MYvDbrcHflwYfVMwqXJFKibmr kIEmVQtPXxSIWRuUTF+VqWzKtQhZQI7vG/MjY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=bNuVjMmwpnUpb7FWz56dLxEs8WFwNqjb Ws6tteiBbIZky4lh8bKRQ5tiKPZYFNsqJ/+z4+/jYvCifMvx7qnDfk14cXyudq3S eUXT5SdXflgsUQS4iYAT4+q8KXqqnbLzOVOikZv3Db6pHQRszcVITsClibaEHWTy G7HfqtbmerI= Original-Received: from pb-sasl0.int.icgroup.com (unknown [127.0.0.1]) by pb-sasl0.pobox.com (Postfix) with ESMTP id 8F94036DD7; Sat, 27 Sep 2014 11:29:09 -0400 (EDT) Original-Received: from badger (unknown [91.117.99.191]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl0.pobox.com (Postfix) with ESMTPSA id 75B7336DD6; Sat, 27 Sep 2014 11:29:08 -0400 (EDT) In-Reply-To: <87tx3vc7d9.fsf@yeeloong.lan> (Mark H. Weaver's message of "Fri, 26 Sep 2014 00:50:58 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Pobox-Relay-ID: 0617970A-465B-11E4-A463-94B274CAD1A7-02397024!pb-sasl0.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.72.237.25 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11556 Archived-At: On Fri 26 Sep 2014 06:50, Mark H Weaver writes: > Mark H Weaver writes: > >> Andy Wingo 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? This can happen if the object is on a free list. Free lists are just normal heap-managed data structures -- traced by the GC, counting as live. See e.g. gc-inline.h in master; a variation of this exact code is used internally in libgc by the allocation API. Andy -- http://wingolog.org/