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

bus error with recursion #6

Closed
GoogleCodeExporter opened this issue Mar 19, 2015 · 3 comments
Closed

bus error with recursion #6

GoogleCodeExporter opened this issue Mar 19, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
(define (loop a) (
       (begin
       (print a)
       (loop (+ a 1))
       )
))
(loop 1)

What is the expected output? What do you see instead?
expect stack overflow

Please use labels and text to provide additional information.


Original issue reported on code.google.com by hige...@gmail.com on 14 May 2008 at 5:26

@GoogleCodeExporter
Copy link
Author

The version without `begin'
(define (loop i)
  ((print i)
   (loop (+ i 1))))

(loop 1)
properly causes stack overflow.

The version without `print' also causes stack overflow.
(define (loop i)
  ((begin
     (loop (+ i 1)))))

(loop 1)


Original comment by dico.leq...@gmail.com on 15 May 2008 at 11:05

@GoogleCodeExporter
Copy link
Author

Original comment by hige...@gmail.com on 16 May 2008 at 1:42

@GoogleCodeExporter
Copy link
Author

Fixed on trunk

Original comment by hige...@gmail.com on 17 May 2008 at 3:23

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant