chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Crash in SRFI-69 eq?-hash


From: Thomas Chust
Subject: [Chicken-users] Crash in SRFI-69 eq?-hash
Date: Sun, 19 Aug 2018 03:40:26 +0200

Hello,

while trying to port some code from CHICKEN 4 to CHICKEN 5 I have just
spent several hours tracking down a crash to a call of
hash-table-ref/default for a table which happened to use eq? as the
comparison function and was loaded with various types of objects as
keys.

Then I realized that eq?-hash simply cannot be called on certain types
of objects:

  $ chicken-status
  [...]
  srfi-69 ....................................................... version: 0.2
  [...]

  $ csi
  CHICKEN
  (c) 2008-2018, The CHICKEN Team
  (c) 2000-2007, Felix L. Winkelmann
  Version 5.0.0rc1 (prerelease) (rev 9d480412)
  linux-unix-gnu-x86-64 [ 64bit dload ptables ]

  #;1> (import srfi-69)
  ; loading /opt/chicken/lib/chicken/9/srfi-69.import.so ...
  ; loading /opt/chicken/lib/chicken/9/srfi-69.so ...
  #;2> (eq?-hash 2/3)
  [panic] out of memory - heap has reached its maximum size - execution 
terminated

Apart from fractions, complex numbers also seem to trigger the crash
reliably.

Since I don't see any obvious reason why hashing by object identity
should be impossible for certain values, I consider this a serious
bug :-/

Ciao,
Thomas


-- 
The greatest victory is that which requires no battle.
-- Sun Tzu, "The Art of War"

Attachment: pgp75aRhSMGXV.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]