Problem with equal-hash? -- Segmentation fault: 11

Create issue
Issue #182 resolved
Takashi Kato repo owner created an issue

Comments (3)

  1. Takashi Kato reporter

    eqv? of record causes stack overflow. The following is a simple example:

    (import (rnrs))
    (define-record-type (<pare> kons pare?)
      (fields (mutable a kar set-kar!)
          (mutable d kdr set-kdr!)))
    (let ((a (kons 'a 'b))
          (b (kons 'a 'b)))
      (set-kdr! a a)
      (set-kdr! b b)
      (eqv? a b))
    ;; -> SEGV
  2. Takashi Kato reporter

    Both R6RS and R7RS say that comparison of record by eqv? returns #t only if the memory location is the same. So basically, the error case should always return #f.

    NB: this also means equal? must also return #f for the sake of R6RS. (or more precisely, the R6RS test suites.)

  3. Log in to comment