[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] alist->hash-table bug
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] alist->hash-table bug |
Date: |
Mon, 2 Mar 2009 12:44:18 +0100 |
On Sun, Mar 1, 2009 at 11:01 AM, Drew Hess <address@hidden> wrote:
> On Sat, Feb 28, 2009 at 11:53 PM, Drew Hess <address@hidden> wrote:
>> Hi,
>>
>> I'm able to consistently reproduce a segfault using alist->hash-table
>> with Chicken 3.4.0 on 3 different platforms: Debian unstable x86-64, Mac
>> OS X 10.5.6 x86-64 and Mac OS 10.5.6 i386.
>>
Indeed a bug. Thanks, Drew. I'll commit the fix in the next hours.
cheers,
felix
Index: srfi-69.scm
===================================================================
--- srfi-69.scm (revision 13403)
+++ srfi-69.scm (working copy)
@@ -984,9 +984,11 @@
(lambda (alist . rest)
(##sys#check-list alist 'alist->hash-table)
(let ([ht (apply make-hash-table rest)])
- (for-each (lambda (x)
- (*hash-table-update!/default ht (##sys#slot x 0)
identity (##sys#slot x 1)) )
- alist)
+ (for-each
+ (lambda (x)
+ (##sys#check-pair x 'alist->hash-table)
+ (*hash-table-update!/default ht (##sys#slot x 0) identity
(##sys#slot x 1)) )
+ alist)
ht ) ) ) )
;; Hash-Table Keys & Values: