Skip to content

Stack overflow in the garbage collector #21

Description

@DemiMarie

When running julia --lisp (so using Julia's version of Femtolisp) with this Scheme file:

(define (longer-and-longer x)
  (let ((my-car (car x)))
    (set-car! x (cons my-car #f))
    (longer-and-longer x)))

(longer-and-longer (cons #f #f))

the result is a SIGSEGV due to a stack overflow (confirmed by Valgrind).

I suspect this is in the garbage collector, since replacing car with cdr (and set-car! with set-cdr! takes much longer before segfaulting (possibly due to a use-after-free error, most likely due to integer overflow).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions