GNU bug report logs - #27476
Multi-threaded compilation of 'syntax-parameterize' forms crashes

Previous Next

Package: guile;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Sat, 24 Jun 2017 16:33:01 UTC

Severity: serious

Tags: unreproducible

Merged with 27652, 28144, 31294, 31367, 31740, 32385, 34112, 34319

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Andy Wingo <wingo <at> igalia.com>
Cc: Ricardo Wurmus <rekado <at> elephly.net>, 27476 <at> debbugs.gnu.org
Subject: bug#27476: libguile/memoize.c is not thread safe, so syntax parameter expansion is not thread-safe
Date: Wed, 06 Feb 2019 23:09:23 +0100
Hi!

Andy Wingo <wingo <at> igalia.com> skribis:

> To be clear, here's the series of events.  Firstly, know that defining a
> syntax parameter is like:

Thanks for the clear explanation!

>> So I came up with ‘define-syntax-parameter-once’, which is like
>> ‘define-once’ but for syntax parameters (note that we can’t use
>> ‘define-once’ in ‘define-syntax-parameter-once’ because it expands to a
>> reference to NAME, which doesn’t work for a macro):
>
> Your fix is good!  But, it prevents redefinition of syntax parameters.

Yes.  It’s acceptable in this case, so I’ve pushed it as a workaround as
commit 8245bb74fc7bdcdc2f9d458057cefc9cd982e489 in Guix.

> I would like to work on a solution that instead of using this
> double-lookup, simply adds an association between P and F* in the
> environment, instead of doing the double-lookup thing.  Probably that
> will be 3.0-only.
>
> For 2.2, we can probably update the compiler to trampoline through some
> kind of "redefine-syntax" or something that will do (set-car! B F**)
> instead of (define P (stx-param B*)).  I.e. redefinition keeps the
> unique key there.

Sounds good.  Are you taking a look at this?

Perhaps that’d be a good excuse to release 2.2.5.

Thank you!

Ludo’.




This bug report was last modified 4 years and 152 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.