You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function executes undefined behavior, but the compiler has no idea somehow:
julia> Base.infer_effects(do_ub, ())
(!c,+e,+n,+t,+s,+m,+u,+o,+r)
julia>do_ub()
Warning: detected a stack overflow; program state may be corrupted, so further execution might be unreliable.
ERROR: StackOverflowError:
The text was updated successfully, but these errors were encountered:
julia> unsafe_getindex(t::Tuple, i::Int) =getfield(t, i, false)
unsafe_getindex (generic function with 1 method)
julia> InteractiveUtils.@infer_effectsunsafe_getindex((), 1)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
julia> unsafe_getindex((), 1)
Unreachable reached at 0x7c963f26350f
[72487] signal 4 (2): Illegal instruction
in expression starting at REPL[3]:1
unsafe_getindex at ./REPL[1]:1
[...]
This function executes undefined behavior, but the compiler has no idea somehow:
The text was updated successfully, but these errors were encountered: