hlb icon indicating copy to clipboard operation
hlb copied to clipboard

add infinite loop detection

Open coryb opened this issue 4 years ago • 0 comments

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

coryb avatar May 12 '21 23:05 coryb