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
The following program writes out of bounds. Is this expected behavior? An assert could be added to the inject_at family of procedures but I see that there is a pop and pop_safe which leads me to believe an assert isn't the favored approach.
Btw, if there is a clear alternative approach that we want to take here, I'd be happy to assist in implementation. But again unsure if this is just expected or not.
Context
The following program writes out of bounds. Is this expected behavior? An assert could be added to the
inject_at
family of procedures but I see that there is apop
andpop_safe
which leads me to believe an assert isn't the favored approach.Odin: dev-2024-12:0a29d36aa
OS: macOS Sonoma 14.4.1 (build 23E224, kernel 23.4.0)
CPU: Apple M2
RAM: 24576 MiB
Backend: LLVM 18.1.8
Expected Behavior
I expected inject_at to not write out of bounds and return false or panic at runtime.
Current Behavior
inject_at will write out of bounds given a negative index
Steps to Reproduce
Failure Logs
On my machine, the output is:
[50]
[50, 100]
[105553138418384, 50, 100]
The text was updated successfully, but these errors were encountered: