Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#272 GETHASH handling of BIGNUM with EQUALP

Stable_release
closed
nobody
None
1
2013-10-30
2013-10-28
Matthew Mondor
No

I have noticed that src/c/hash.d's bignum_t switch/case of _hash_equalp() is
missing, causing a fallthrough. Since the code is not lint-annotated
(/* FALLTHROUGH */ in this case) it was unclear for me if this was voluntary
or not, but it seemed suspicious. I therefore tried the following:

(defparameter *t* (make-hash-table :test #'equalp))
(gethash MOST-POSITIVE-FIXNUM *t*) -> NIL NIL
(gethash (1+ MOST-POSITIVE-FIXNUM) *t*)
;;;
;;; Detected access to protected memory, also kwown as 'bus or segmentation
fault'.
;;; Jumping to the outermost toplevel prompt
;;;

(Note that SLIME cannot recover from SIGBUS here and must be restarted, but
the ECL REPL returns to the toplevel directly. This perhaps eventually could
be part of another bug report if it can be handled better in ECL or SWANK).

Discussion

  • Matthew Mondor
    Matthew Mondor
    2013-10-30

    I have tested the fix and it solved the issue.
    Thanks for the quick fix!

     


Anonymous


Cancel   Add attachments