GNU bug report logs - #19415
Compiler shares storage for assoc-lists even if some of them are mutated

Previous Next

Package: guile;

Reported by: Panicz Maciej Godek <godek.maciek <at> gmail.com>

Date: Fri, 19 Dec 2014 23:54:02 UTC

Severity: normal

Tags: notabug

Merged with 19417

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19415 in the body.
You can then email your comments to 19415 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#19415; Package guile. (Fri, 19 Dec 2014 23:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Panicz Maciej Godek <godek.maciek <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Fri, 19 Dec 2014 23:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Panicz Maciej Godek <godek.maciek <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: Compiler shares storage for assoc-lists even if some of them are
 mutated
Date: Sat, 20 Dec 2014 00:53:11 +0100
[Message part 1 (text/plain, inline)]
This bug was traced by Matt Wette and described here:

http://lists.gnu.org/archive/html/guile-user/2014-12/msg00023.html

In short, the bug manifests itself when at least two consecutive let forms
are used with an assoc list argument which starts with identical elements,
and the first appearance gets mutated before the second:

(begin
  (let ((l '((a . X)(b . Y)(c . 7))))
    (assoc-set! l 'b 'Z))
  (let ((l '((a . X)(b . Y))))
    l))
===> ((a . X) (b . Z))

The issue is known to appear in guile 2.0.11 and 2.0.5
[Message part 2 (text/html, inline)]

Information forwarded to bug-guile <at> gnu.org:
bug#19415; Package guile. (Mon, 22 Dec 2014 07:11:01 GMT) Full text and rfc822 format available.

Message #8 received at 19415 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Panicz Maciej Godek <godek.maciek <at> gmail.com>
Cc: request <at> debbugs.gnu.org, 19415 <at> debbugs.gnu.org
Subject: Re: bug#19415: Compiler shares storage for assoc-lists even if some
 of them are mutated
Date: Mon, 22 Dec 2014 02:08:31 -0500
tags 19415 + notabug
close 19415
merge 19415 19417
thanks

Panicz Maciej Godek <godek.maciek <at> gmail.com> writes:

> This bug was traced by Matt Wette and described here:
>
> http://lists.gnu.org/archive/html/guile-user/2014-12/msg00023.html
>
> In short, the bug manifests itself when at least two consecutive let
> forms are used with an assoc list argument which starts with identical
> elements, and the first appearance gets mutated before the second:
>
> (begin
> (let ((l '((a . X)(b . Y)(c . 7))))
> (assoc-set! l 'b 'Z))
> (let ((l '((a . X)(b . Y))))
> l))
> ===> ((a . X) (b . Z))
>
> The issue is known to appear in guile 2.0.11 and 2.0.5

As later explained on guile-user, mutating literal data is not permitted
in scheme and leads to unspecified behavior.  Our compiler aggressively
shares data between literals in the same compilation unit.

See <http://bugs.gnu.org/16060> for a related wishlist item.

     Thanks,
       Mark




Added tag(s) notabug. Request was from Mark H Weaver <mhw <at> netris.org> to control <at> debbugs.gnu.org. (Mon, 22 Dec 2014 07:11:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 19415 <at> debbugs.gnu.org and Panicz Maciej Godek <godek.maciek <at> gmail.com> Request was from Mark H Weaver <mhw <at> netris.org> to control <at> debbugs.gnu.org. (Mon, 22 Dec 2014 07:11:03 GMT) Full text and rfc822 format available.

Merged 19415 19417. Request was from Mark H Weaver <mhw <at> netris.org> to control <at> debbugs.gnu.org. (Mon, 22 Dec 2014 07:11:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 19 Jan 2015 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 249 days ago.

Previous Next


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