Skip to content

Dict.insert stuck in infinite loop: optimized build #6936

Open
@bhansconnect

Description

@bhansconnect

No idea what is going on, but in a lisp interpreter posted on zulip, roc looks to be getting stuck in an infinite loop if run with optimized builds. Probably something wrong with llvm allocas and joinpoints? That at least seems like a reasonable guess. That or maybe llvm misunstanding an alloca lifetime cause we don't label it correctly (not sure how that works with loops).

Repro source (not minimized):
https://github.com/raymyers/roc-lisp/blob/1ddb69def35a31cbf00d0f8dcd5b1815a5cd20b8/main.roc

Just build and feed in this example:

(define fib (lambda (n) (if (<= n 2) 1 (+ (fib (- n 1)) (fib (- n 2))))))
(fib 18)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcode genGenerating machine codeintermediate issueLikely good for someone who has completed a few other issuesllvmRelates to LLVM backend

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions