Skip to content

Recursive atoms cause stackoverflow error #21

@ghost

Description

This code will cause a stackoverflow error:

(def a (atom nil)) (def b (atom a)) (reset! a b)
a

Possible solutions are:

  1. print-method multimethod can be used to fix this for clojure repl. Maybe use that if it's available (https://clojuredocs.org/clojure.core/get-method)

  2. Don't print atoms target value in defstream IRef. It makes sense because atoms are used to opt out of the value semantics of clojure, and making recursive structures is a common use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions