Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

equal? from (scheme base) not halting when it should #929

Closed
sham1 opened this issue Jul 27, 2023 · 2 comments
Closed

equal? from (scheme base) not halting when it should #929

sham1 opened this issue Jul 27, 2023 · 2 comments

Comments

@sham1
Copy link

sham1 commented Jul 27, 2023

Earlier today, I noticed a bug when I inputted the following forms in the REPL:

(import (scheme base))
(equal? '#1=(#1# . #1#) '#2=(#2# . #2#))

Instead of this halting as expected and required by R7RS, it instead goes into an infinite loop.

@ashinn
Copy link
Owner

ashinn commented May 29, 2024

This isn't related to equal?, it's the compiler not supporting raw cyclic literals in the source:

This hangs as well:

((lambda (a b) #t) '#1=(#1# . #1#) '#2=(#2# . #2#))

and supporting that is a very low priority. This, however, currently gives me a segfault:

 (let ((a (cons 1 2)) (b (cons 3 4)))
  (set-car! a a)
  (set-cdr! a a)
  (set-car! b b)
  (set-cdr! b b)
  (equal? a b))

will take a look.

@ashinn
Copy link
Owner

ashinn commented May 29, 2024

We were blowing the stack, reduced the bound in 045bb18.

@ashinn ashinn closed this as completed May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants