GNU bug report logs - #33827
SRFI 69 weak hash-tables is broken

Previous Next

Package: guile;

Reported by: Jéssica Milaré <jessymilare <at> gmail.com>

Date: Fri, 21 Dec 2018 16:23:01 UTC

Severity: normal

To reply to this bug, email your comments to 33827 AT debbugs.gnu.org.

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#33827; Package guile. (Fri, 21 Dec 2018 16:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jéssica Milaré <jessymilare <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Fri, 21 Dec 2018 16:23:02 GMT) Full text and rfc822 format available.

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

From: Jéssica Milaré <jessymilare <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: SRFI 69 weak hash-tables is broken
Date: Fri, 21 Dec 2018 09:13:50 -0200
[Message part 1 (text/plain, inline)]
The srfi-69 implementation that comes with Guile doesn't function properly
when some non-false #:weak argument is provided. The problems seems to be
that it tries to use handles, which are only available for non-weak
hash-tables.

scheme@(guile-user)> (import (srfi :69))
scheme@(guile-user)> (define ht (make-hash-table eq? hashq #:weak 'key))
scheme@(guile-user)> (hash-table-set! ht 10 10)
ERROR: In procedure hashx-create-handle!:
In procedure scm_hash_fn_create_handle_x: Wrong type argument in position 1
(expecting hash-table): #<weak-table 0/31>

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]>


Regards,
Jessica
[Message part 2 (text/html, inline)]

Information forwarded to bug-guile <at> gnu.org:
bug#33827; Package guile. (Sat, 22 Dec 2018 17:46:01 GMT) Full text and rfc822 format available.

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

From: Jéssica Milaré <jessymilare <at> gmail.com>
To: 33827 <at> debbugs.gnu.org
Subject: Attempt to fix
Date: Sat, 22 Dec 2018 15:44:44 -0200
[Message part 1 (text/plain, inline)]
I'll try to fix this bug and create some tests, then I send a format-patch
here. I'll need to do that anyway.
[Message part 2 (text/html, inline)]

Information forwarded to bug-guile <at> gnu.org:
bug#33827; Package guile. (Sun, 23 Dec 2018 17:10:02 GMT) Full text and rfc822 format available.

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

From: Jéssica Milaré <jessymilare <at> gmail.com>
To: 33827 <at> debbugs.gnu.org
Subject: Patch
Date: Sun, 23 Dec 2018 15:09:22 -0200
[Message part 1 (text/plain, inline)]

[Message part 2 (text/html, inline)]
[0001-Fix-SRFI-69-don-t-use-handles-with-weak-tables-anymo.patch (text/x-patch, attachment)]

Information forwarded to bug-guile <at> gnu.org:
bug#33827; Package guile. (Wed, 09 Jan 2019 00:22:01 GMT) Full text and rfc822 format available.

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

From: Jéssica Milaré <jessymilare <at> gmail.com>
To: 33827 <at> debbugs.gnu.org
Subject: Patches
Date: Tue, 8 Jan 2019 22:21:04 -0200
[Message part 1 (text/plain, inline)]
Patch 0001 fixes SRFI-69 bugs as specified. Patches 0002 to 0005 implement
the module (ice-9 generic-hash-tables) and then reimplement SRFI-69 and
(rnrs hashtables) and add an implementation of SRFI 126, all of them using
generic-hash-tables (and therefore compatible to each other).

I've called `make check' after each commit and all tests PASS: or XFAIL:,
except the four tests in linker.test, as reported in Bug 33991[1].

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33991
[Message part 2 (text/html, inline)]
[0003-Reimplemented-SRFI-69-using-GENERIC-HASH-TABLES.patch (text/x-patch, attachment)]
[0001-Fix-SRFI-69-don-t-use-handles-with-weak-tables.patch (text/x-patch, attachment)]
[0004-Reimplemented-RNRS-HASHTABLES-using-GENERIC-HASH-TAB.patch (text/x-patch, attachment)]
[0005-Implemented-SRFI-126-using-GENERIC-HASH-TABLES.patch (text/x-patch, attachment)]
[0002-Implemented-GENERIC-HASH-TABLES-module.patch (text/x-patch, attachment)]

Information forwarded to bug-guile <at> gnu.org:
bug#33827; Package guile. (Sun, 13 Jan 2019 22:54:02 GMT) Full text and rfc822 format available.

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

From: Jéssica Milaré <jessymilare <at> gmail.com>
To: 33827 <at> debbugs.gnu.org
Subject: Re: Patches
Date: Sun, 13 Jan 2019 20:53:04 -0200
[Message part 1 (text/plain, inline)]
The rest of the patches are here, implementing SRFI 128 and SRFI 125.

Em ter, 8 de jan de 2019 às 22:21, Jéssica Milaré <jessymilare <at> gmail.com>
escreveu:

> Patch 0001 fixes SRFI-69 bugs as specified. Patches 0002 to 0005 implement
> the module (ice-9 generic-hash-tables) and then reimplement SRFI-69 and
> (rnrs hashtables) and add an implementation of SRFI 126, all of them using
> generic-hash-tables (and therefore compatible to each other).
>
> I've called `make check' after each commit and all tests PASS: or XFAIL:,
> except the four tests in linker.test, as reported in Bug 33991[1].
>
> [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33991
>
[Message part 2 (text/html, inline)]
[0006-Fix-wrong-year-in-copyright-notices.patch (text/x-patch, attachment)]
[0009-Implemented-SRFI-125.patch (text/x-patch, attachment)]
[0008-Fix-bugs-in-GENERIC-HASH-TABLES.patch (text/x-patch, attachment)]
[0010-Created-a-procedure-that-returns-the-size-of-a-hash-.patch (text/x-patch, attachment)]
[0007-Implemented-SRFI-128.patch (text/x-patch, attachment)]

This bug report was last modified 6 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.