From debbugs-submit-bounces@debbugs.gnu.org Wed May 09 05:24:09 2018 Received: (at 27476) by debbugs.gnu.org; 9 May 2018 09:24:09 +0000 Received: from localhost ([127.0.0.1]:54816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fGLKS-00059y-PI for submit@debbugs.gnu.org; Wed, 09 May 2018 05:24:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fGLKR-00059k-D9 for 27476@debbugs.gnu.org; Wed, 09 May 2018 05:24:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGLKL-0008WR-At for 27476@debbugs.gnu.org; Wed, 09 May 2018 05:24:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35636) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGLKL-0008WF-6Y; Wed, 09 May 2018 05:24:01 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48424 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fGLKK-0008Te-Or; Wed, 09 May 2018 05:24:01 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Andy Wingo Subject: Re: libguile/memoize.c is not thread safe, so syntax parameter expansion is not thread-safe References: <87h8vvp1q7.fsf@elephly.net> <87377esu1a.fsf@gnu.org> <87k20nz18u.fsf@igalia.com> <87a81jj5gg.fsf@gnu.org> <87bmlyzxj7.fsf@elephly.net> <87shf44ny0.fsf@elephly.net> <878tfi9x15.fsf@gnu.org> <87h8nstms1.fsf@gnu.org> <874ljstlvq.fsf_-_@gnu.org> <87603x6x1f.fsf@igalia.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 20 =?utf-8?Q?Flor=C3=A9al?= an 226 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 09 May 2018 11:23:59 +0200 In-Reply-To: <87603x6x1f.fsf@igalia.com> (Andy Wingo's message of "Wed, 09 May 2018 10:41:32 +0200") Message-ID: <878t8tyyfk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27476 Cc: Ricardo Wurmus , 27476@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hello Andy! Andy Wingo skribis: > On Mon 30 Apr 2018 23:39, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> So the problem, AIUI, is that psyntax evaluates syntax parameters using >> =E2=80=98primitive-eval=E2=80=99 (via =E2=80=98eval-local-transformer=E2= =80=99), but memoization in >> (ice-9 eval) is not thread-safe, hence the random crashes. > > Sorry I've been a bit AWOL here... if this diagnosis is correct, then > the problem is ultimately the memoization that needs to be thread-safe, > right? It looks like it, yes. > Is the memoization you are referring to the "set!" in the "lazy" form in > ice-9/eval.scm ? Or something else? FWIW I would not think the "set!" > could be the issue, at least on x86, but who knows. Actually I=E2=80=99m not sure exactly. =E2=80=98memoize-expression=E2=80= =99 itself is side-effect-free, right? Thanks for your feedback, Ludo=E2=80=99.