PROMETHIA-27 opened issue #6646:
Minimal example
https://gist.github.com/PROMETHIA-27/7ac3d63e82610a220048442886cbebe5
Steps to Reproduce
Run this example (with dependencies cranelift_codegen, cranelift_jit, cranelift_module) and after ~30,000 iterations it should crash.
Expected Results
The example completes after 50,000 iterations and nothing notable happens.
Actual Results
it fails with the following error:
`thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: TryFromIntError(())', C:\Users\elect\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cranelift-jit-0.97.1\src\backend.rs:299:82`
Versions and Environment
Cranelift version or commit: Latest commit as of now as well as 0.97.1
Operating system: Windows x64
Architecture: x86_64
Extra Info
I encountered this while attempting to exclude the cost of dropping modules from a benchmark that runs roughly 50,000 times. I hope it doesn't affect anything more important but I suspect that it's UB. When I insert a print statement into the panicking function to print
what - at
every call, it consistently reports values around -2^16 and does not panic. When I insert a print statement that only activates when thetry_into
fails, it reports something closer to +/-4 billion and panics at roughly ~30,000 iterations.
PROMETHIA-27 labeled issue #6646:
Minimal example
https://gist.github.com/PROMETHIA-27/7ac3d63e82610a220048442886cbebe5
Steps to Reproduce
Run this example (with dependencies cranelift_codegen, cranelift_jit, cranelift_module) and after ~30,000 iterations it should crash.
Expected Results
The example completes after 50,000 iterations and nothing notable happens.
Actual Results
it fails with the following error:
`thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: TryFromIntError(())', C:\Users\elect\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cranelift-jit-0.97.1\src\backend.rs:299:82`
Versions and Environment
Cranelift version or commit: Latest commit as of now as well as 0.97.1
Operating system: Windows x64
Architecture: x86_64
Extra Info
I encountered this while attempting to exclude the cost of dropping modules from a benchmark that runs roughly 50,000 times. I hope it doesn't affect anything more important but I suspect that it's UB. When I insert a print statement into the panicking function to print
what - at
every call, it consistently reports values around -2^16 and does not panic. When I insert a print statement that only activates when thetry_into
fails, it reports something closer to +/-4 billion and panics at roughly ~30,000 iterations.
PROMETHIA-27 labeled issue #6646:
Minimal example
https://gist.github.com/PROMETHIA-27/7ac3d63e82610a220048442886cbebe5
Steps to Reproduce
Run this example (with dependencies cranelift_codegen, cranelift_jit, cranelift_module) and after ~30,000 iterations it should crash.
Expected Results
The example completes after 50,000 iterations and nothing notable happens.
Actual Results
it fails with the following error:
`thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: TryFromIntError(())', C:\Users\elect\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cranelift-jit-0.97.1\src\backend.rs:299:82`
Versions and Environment
Cranelift version or commit: Latest commit as of now as well as 0.97.1
Operating system: Windows x64
Architecture: x86_64
Extra Info
I encountered this while attempting to exclude the cost of dropping modules from a benchmark that runs roughly 50,000 times. I hope it doesn't affect anything more important but I suspect that it's UB. When I insert a print statement into the panicking function to print
what - at
every call, it consistently reports values around -2^16 and does not panic. When I insert a print statement that only activates when thetry_into
fails, it reports something closer to +/-4 billion and panics at roughly ~30,000 iterations.
bjorn3 commented on issue #6646:
Duplicate of https://github.com/bytecodealliance/wasmtime/issues/4000
PROMETHIA-27 closed issue #6646:
Minimal example
https://gist.github.com/PROMETHIA-27/7ac3d63e82610a220048442886cbebe5
Steps to Reproduce
Run this example (with dependencies cranelift_codegen, cranelift_jit, cranelift_module) and after ~30,000 iterations it should crash.
Expected Results
The example completes after 50,000 iterations and nothing notable happens.
Actual Results
it fails with the following error:
`thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: TryFromIntError(())', C:\Users\elect\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cranelift-jit-0.97.1\src\backend.rs:299:82`
Versions and Environment
Cranelift version or commit: Latest commit as of now as well as 0.97.1
Operating system: Windows x64
Architecture: x86_64
Extra Info
I encountered this while attempting to exclude the cost of dropping modules from a benchmark that runs roughly 50,000 times. I hope it doesn't affect anything more important but I suspect that it's UB. When I insert a print statement into the panicking function to print
what - at
every call, it consistently reports values around -2^16 and does not panic. When I insert a print statement that only activates when thetry_into
fails, it reports something closer to +/-4 billion and panics at roughly ~30,000 iterations.
Last updated: Dec 23 2024 at 12:05 UTC