From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: [Guile-commits] GNU Guile branch, master, updated. v2.1.0-213-gb43e81d Date: Sat, 05 Oct 2013 13:22:29 +0200 Message-ID: <87fvsg2c96.fsf@pobox.com> References: <87bo35bra9.fsf@netris.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1380972177 27786 80.91.229.3 (5 Oct 2013 11:22:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Oct 2013 11:22:57 +0000 (UTC) Cc: guile-devel@gnu.org To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Oct 05 13:22:59 2013 Return-path: Envelope-to: guile-devel@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 1VSPwp-0006kW-Oa for guile-devel@m.gmane.org; Sat, 05 Oct 2013 13:22:59 +0200 Original-Received: from localhost ([::1]:51516 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSPwp-00088A-96 for guile-devel@m.gmane.org; Sat, 05 Oct 2013 07:22:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSPwg-00087s-3k for guile-devel@gnu.org; Sat, 05 Oct 2013 07:22:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VSPwb-0006zB-Bx for guile-devel@gnu.org; Sat, 05 Oct 2013 07:22:50 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:57991 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSPwb-0006z5-8Z for guile-devel@gnu.org; Sat, 05 Oct 2013 07:22:45 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id D5525C01E; Sat, 5 Oct 2013 07:22:43 -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=RYrBpkvyFIlXpt4eChr63S3B8Wo=; b=rU6JPR 31ReuXWgV3QJlXJRwjV8U5UXcSryZ5SqDJema8zumA/4/PbkHIn/VML+zJfvvULs 2a1nlwbpq44GUJ3ieenjarME6QDX8mvhQr30oA4FacEoeoWj/WHiGnODXQaVQuqF C/NWqJi264I06uDCcvxMIhj7lbE8fEJHcl0F0= 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=C0zVODnGHk7h6ALOo3V55R/jq2KHLrS9 LJXE3aF7zI2ciYAi6XV0/rBIcLuHUts5oFrGVH5biJhOXmkINUU7rXiV+jeMpbEv ubenrDa5lMg87tipKV0B/OU7VWAYxGKMvbqTijgEj5SH9dbhwMhoD7VVUpDL0BDJ BdHTEyXrlg8= Original-Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id CDE23C01A; Sat, 5 Oct 2013 07:22:43 -0400 (EDT) Original-Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id EE1B9C013; Sat, 5 Oct 2013 07:22:39 -0400 (EDT) In-Reply-To: <87bo35bra9.fsf@netris.org> (Mark H. Weaver's message of "Fri, 04 Oct 2013 00:20:46 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Pobox-Relay-ID: 73EE991E-2DB0-11E3-8B7D-0A540E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 208.72.237.25 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16669 Archived-At: Hi, On Fri 04 Oct 2013 06:20, Mark H Weaver writes: > This lazy initialization pattern is not safe on modern weakly ordered > memory architectures. I've already raised this issue on the mailing > list more than once, and I've been trying to fix these bugs wherever I > can find them, but they are non-trivial to search for. Please do not > add more. > > We need to either use a mutex to guard both reads and writes of > 'program_source' (including the "scm_is_false (program_source)" check), > or we need to arrange for 'program_source' to be initialized during > guile's initialization before any other threads are created. I'm happy to fix up the ones that I introduce. There needs to be a better abstraction for doing this lazy-init operation. I might not get around to making that abstraction before introducing a few more though; apologies in advance for that. They are actually very easy to search for, though. Search for " static SCM" and you've got all of them :) Andy -- http://wingolog.org/