JuliaDebug / JuliaInterpreter.jl

Interpreter for Julia code
Other
158 stars 33 forks source link

Have an option to abort on too long stack #627

Open KristofferC opened 1 month ago

KristofferC commented 1 month ago

Would be useful to debug stack overflows. Right now, stuff like

julia> @interpret randMPS(Float64, 6, U1SpinlessFermion.pspace, Rep[U₁](c => 1 for c in -1:1/2:1))

Internal error: during type inference of
handle_err(Any, JuliaInterpreter.Frame, StackOverflowError)
Encountered stack overflow.
This might be caused by recursion over very long tuples or argument lists.
Internal error: during type inference of
handle_err(Any, JuliaInterpreter.Frame, StackOverflowError)
Encountered stack overflow.
This might be caused by recursion over very long tuples or argument lists.
Internal error: encountered unexpected error during compilation of handle_err:
StackOverflowError()
Internal error: during type inference of
handle_err(Any, JuliaInterpreter.Frame, StackOverflowError)
Encountered stack overflow.
This might be caused by recursion over very long tuples or argument lists.
Internal error: encountered unexpected error during compilation of handle_err:
StackOverflowError()

happens