Menu

#671 EQUALP sporadically returns wrong result on EQUALP hash tables

open
nobody
5
2015-04-27
2015-04-27
No

Once every 1000-10000 runs, EQUALP on complicated EQUALP hash tables returns NIL instead of T. Reproducible with:

(defun make-cuckoo-hash-table ()
  (let ((h1 (make-hash-table :test 'equalp))
        (h2 (make-hash-table :test 'equalp))
        (h  (make-hash-table :test 'equalp)))
    (setf (gethash 1 h1) 2
          (gethash 2 h2) 1
          (gethash h1 h) h2
          (gethash h2 h) h1)
    h))

(loop for i from 0
    for h1 = (make-cuckoo-hash-table)
    for h2 = (make-cuckoo-hash-table)
    unless (progn (print i) (princ (equalp h1 h2)))
    do (return (values h1 h2)))

output:

0 T
1 T
2 T
3 T
;; ...
1040 T
1041 T
1042 T
1043 NIL

Note: I am reporting this problem for my primary amd64 system described below, but it happens also on a newly installed ARM system I have (Raspberry PI 2)

$ cat /etc/debian_version
8.0

$ uname -a
phoenix 3.19.2-x64-initrd #1 SMP Sun Mar 22 23:18:59 CET 2015 x86_64 GNU/Linux

GNU libc is libc6:amd64 version 2.19-18

Clisp was installed via apt-get from official .deb (reported as version 1:2.49-8.2).

$ clisp --version
GNU CLISP 2.49 (2010-07-07) (built on localhost [127.0.0.1])
Software: GNU C 4.7.3
gcc -falign-functions=4 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -O -falign-functions=4 -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES -I. -lreadline -lncurses -ldl /usr/lib/libavcall.so /usr/lib/libcallback.so -L/usr/lib -lsigsegv libgnu_cl.a
SAFETY=0 TYPECODES WIDE_HARD GENERATIONAL_GC SPVW_BLOCKS SPVW_MIXED TRIVIALMAP_MEMORY
libsigsegv 2.9
libreadline 5.2
libffcall 1.11
Features:
(READLINE REGEXP SYSCALLS I18N LOOP COMPILER CLOS MOP CLISP ANSI-CL COMMON-LISP LISP=CL INTERPRETER SOCKETS GENERIC-STREAMS LOGICAL-PATHNAMES SCREEN
FFI GETTEXT UNICODE BASE-CHAR=CHARACTER WORD-SIZE=64 PC386 UNIX)
C Modules: (clisp i18n syscalls regexp readline)
Installation directory: /usr/lib/clisp-2.49/
User language: ENGLISH
Machine: X86_64 (X86_64) phoenix [192.168.1.4]

Discussion


Log in to post a comment.

MongoDB Logo MongoDB