Changes between Initial Version and Version 1 of Ticket #905


Ignore:
Timestamp:
08/23/12 03:04:56 (10 years ago)
Author:
Ivan Raikov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #905 – Description

    initial v1  
    1 The nemo program relies heavily on performing transformations over hash tables with symbols as keys. It works fine with Chicken 4.7.4, but unfortunately there seems to have been a regression in 4.8.0rc1, which results in hash-table-exists? and hash-table-ref failing to find any of the existing keys in the table after a number of transformations have been performed. I have not been able to create a small test case yet, but I suspect the hash tables stop working after some garbage collections have been performed. This issue is not entirely new; nemo previously used the environments egg, which was also exhibiting similar unreliable behavior, so I had resorted to using strings instead of symbols as keys. Any advice on how to debug this would be appreciated.
     1The nemo program relies heavily on performing transformations over hash tables with symbols as keys. It works fine with Chicken 4.7.4, but unfortunately there seems to have been a regression in 4.8.0rc1, which results in hash-table-exists? and hash-table-ref failing to find any of the existing keys in the table after a number of transformations have been performed.
     2The following code reproduces the issue:
     3
     4{{{
     5
     6(use srfi-1 srfi-69)
     7
     8(define t (make-hash-table hash: symbol-hash))
     9
     10(hash-table-set! t 'k1 1)
     11(hash-table-ref t 'k1)
     12
     13(for-each
     14  (lambda (k v)
     15    (printf "hash-table-set! ~A ~A~%" k v)
     16    (hash-table-set! t k v))
     17  (list-tabulate 10 (lambda (i) (gensym 'k)))
     18  (list-tabulate 10 (lambda (i) i))
     19  )
     20
     21(print (hash-table-ref t 'k15))
     22}}}
     23
     24Perhaps the hash tables stop working after some garbage collections have been performed. This issue is not entirely new; nemo previously used the environments egg, which was also exhibiting similar unreliable behavior, so I had resorted to using strings instead of symbols as keys. Any advice on how to debug this would be appreciated.