Skip to content

add infinite loop detection #242

@coryb

Description

@coryb

This is a confusing edge case that is hard to debug. If we are lucky we will get a stack overflow error, but depending on the graph to get to the loop this might take hours. Here is a simple repro:

fs cycle() {
	copy cycle "/" "/"
}
hlb run -t cycle ./test.hlb
[+] Building 0.0s (0/0)
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc020b60370 stack=[0xc020b60000, 0xc040b60000]
fatal error: stack overflow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions