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
I'm in the (fairly early) process of building a Rust fuzzer (here) and whilst running it, it came across this discrepancy between optimization levels on the latest released Rust version (1.61.0). It generated a huge file, but this is a reduced code snippet exhibiting the same behaviour.
I expected to see this happen: Run forever (or stack overflow)
Instead, this happened: Crashes with a trace trap (shown below) while running, when run on any optimization level. Running on optimization level 0 does throw a stack overflow error (as expected)
Some changes that would stop the runtime error:
Removing the argument from fun27
Changing the argument from a heap value to something on the stack (like a plain i32 for example)
Removing the #[inline(never)] from fun27
Also, changing the return type of fun27 from ! to () doesn't throw a compilation error (should it?) but when run, the program gracefully exits with a 0 error code.
I'm in the (fairly early) process of building a Rust fuzzer (here) and whilst running it, it came across this discrepancy between optimization levels on the latest released Rust version (1.61.0). It generated a huge file, but this is a reduced code snippet exhibiting the same behaviour.
I tried this code:
I expected to see this happen: Run forever (or stack overflow)
Instead, this happened: Crashes with a trace trap (shown below) while running, when run on any optimization level. Running on optimization level 0 does throw a stack overflow error (as expected)
Some changes that would stop the runtime error:
fun27
i32
for example)#[inline(never)]
fromfun27
Also, changing the return type of
fun27
from!
to()
doesn't throw a compilation error (should it?) but when run, the program gracefully exits with a 0 error code.Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: