GNU bug report logs - #41131
[PATCH] hash-table-merge! ignores other-ht

Previous Next

Package: guile;

Reported by: "Ricardo G. Herdt" <r.herdt <at> posteo.de>

Date: Fri, 8 May 2020 00:20:01 UTC

Severity: normal

Tags: patch

Done: Andy Wingo <wingo <at> pobox.com>

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 41131 in the body.
You can then email your comments to 41131 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#41131; Package guile. (Fri, 08 May 2020 00:20:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Ricardo G. Herdt" <r.herdt <at> posteo.de>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Fri, 08 May 2020 00:20:01 GMT) Full text and rfc822 format available.

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

From: "Ricardo G. Herdt" <r.herdt <at> posteo.de>
To: bug-guile <at> gnu.org
Subject: Bug in hash-table-merge! (and patch)
Date: Fri, 08 May 2020 01:50:01 +0200
[Message part 1 (text/plain, inline)]
Hi,

I just found this bug in the hash-table-merge! function 
(modul/srfi/srfi-69.scm). Instead of merging both hash tables, it was 
ignoring one of them (other-ht). Attached is the fix, where it now folds 
over other-ht and store its data in ht.

Cheers,

Ricardo G. Herdt
[0001-Fix-hash-table-merge-bug.patch (text/x-diff, attachment)]
[Changelog (text/plain, attachment)]

Changed bug title to '[PATCH] hash-table-merge! ignores other-ht' from 'Bug in hash-table-merge! (and patch)' Request was from "Ricardo G. Herdt" <r.herdt <at> posteo.de> to control <at> debbugs.gnu.org. (Mon, 01 Jun 2020 07:41:02 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from "Ricardo G. Herdt" <r.herdt <at> posteo.de> to control <at> debbugs.gnu.org. (Mon, 01 Jun 2020 07:45:01 GMT) Full text and rfc822 format available.

Reply sent to Andy Wingo <wingo <at> pobox.com>:
You have taken responsibility. (Fri, 12 Mar 2021 21:34:02 GMT) Full text and rfc822 format available.

Notification sent to "Ricardo G. Herdt" <r.herdt <at> posteo.de>:
bug acknowledged by developer. (Fri, 12 Mar 2021 21:34:02 GMT) Full text and rfc822 format available.

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

From: Andy Wingo <wingo <at> pobox.com>
To: "Ricardo G. Herdt" <r.herdt <at> posteo.de>
Cc: 41131-done <at> debbugs.gnu.org
Subject: Re: bug#41131: Bug in hash-table-merge! (and patch)
Date: Fri, 12 Mar 2021 22:32:38 +0100
Applied, thanks!

On Fri 08 May 2020 01:50, "Ricardo G. Herdt" <r.herdt <at> posteo.de> writes:

> Hi,
>
> I just found this bug in the hash-table-merge! function
> (modul/srfi/srfi-69.scm). Instead of merging both hash tables, it was 
> ignoring one of them (other-ht). Attached is the fix, where it now folds
> over other-ht and store its data in ht.
>
> Cheers,
>
> Ricardo G. Herdt
>
> From 180a9e14b807295aa31966a52bfd732647458ef9 Mon Sep 17 00:00:00 2001
> From: "Ricardo G. Herdt" <r.herdt <at> posteo.de>
> Date: Fri, 8 May 2020 01:37:24 +0200
> Subject: [PATCH] Fix hash-table-merge! bug.
>
> * module/srfi/srfi-69.scm : fold over second hash table.
> ---
>  module/srfi/srfi-69.scm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/module/srfi/srfi-69.scm b/module/srfi/srfi-69.scm
> index b9486c465..91bcc77db 100644
> --- a/module/srfi/srfi-69.scm
> +++ b/module/srfi/srfi-69.scm
> @@ -330,7 +330,7 @@ Answer the final F result."
>    "Add all key/value pairs from OTHER-HT to HT, overriding HT's
>  mappings where present.  Return HT."
>    (hash-table-fold
> -   ht (lambda (k v ign) (hash-table-set! ht k v)) #f)
> +   other-ht (lambda (k v ign) (hash-table-set! ht k v)) #f)
>    ht)
>  
>  ;;; srfi-69.scm ends here




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 10 Apr 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 9 days ago.

Previous Next


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