We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Both GAS_MCL and GAS_MCLI fail to handle multiply with overflow.
GAS_MCL
GAS_MCLI
GAS_MCL:
thread '<unnamed>' panicked at 'attempt to multiply with overflow', src/interpreter/gas/consts.rs:91:58 stack backtrace: 0: rust_begin_unwind at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/panicking.rs:584:5 1: core::panicking::panic_fmt at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/core/src/panicking.rs:142:14 2: core::panicking::panic at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/core/src/panicking.rs:48:5 3: core::ops::function::FnOnce::call_once 4: fuel_vm::interpreter::executors::instruction::<impl fuel_vm::interpreter::Interpreter<S>>::_instruction 5: fuel_vm::interpreter::executors::instruction::<impl fuel_vm::interpreter::Interpreter<S>>::execute 6: fuel_vm::interpreter::executors::main::<impl fuel_vm::interpreter::Interpreter<S>>::run 7: fuel_vm::interpreter::executors::main::<impl fuel_vm::interpreter::Interpreter<S>>::transact
GAS_MCLI:
thread '<unnamed>' panicked at 'attempt to multiply with overflow', src/interpreter/gas/consts.rs:92:60 stack backtrace: 0: rust_begin_unwind at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/panicking.rs:584:5 1: core::panicking::panic_fmt at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/core/src/panicking.rs:142:14 2: core::panicking::panic at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/core/src/panicking.rs:48:5 3: core::ops::function::FnOnce::call_once 4: fuel_vm::interpreter::executors::instruction::<impl fuel_vm::interpreter::Interpreter<S>>::_instruction 5: fuel_vm::interpreter::executors::instruction::<impl fuel_vm::interpreter::Interpreter<S>>::execute 6: fuel_vm::interpreter::executors::main::<impl fuel_vm::interpreter::Interpreter<S>>::run 7: fuel_vm::interpreter::executors::main::<impl fuel_vm::interpreter::Interpreter<S>>::transact 8: fuel_vm::transactor::Transactor<S>::transact 9: fuel_vm::memory_client::MemoryClient::transact
Here's test cases for both (found with the fuzzing script introduced in #188):
use fuel_vm::prelude::*; #[test] fn multiply_with_overflow_gas_mcl() { let mut client = MemoryClient::default(); let gas_price = 0; let gas_limit = 100_000; let maturity = 0; let height = 0; let params = ConsensusParameters::DEFAULT; let mut tx = Transaction::script( gas_price, gas_limit, maturity, vec![], vec![ 28, 84, 92, 16, 39, 41, 80, 0, ], vec![], vec![], vec![], ) .check(height, ¶ms) .expect("failed to generate a checked tx"); client.transact(tx); } #[test] fn multiply_with_overflow_gas_mcli() { let mut client = MemoryClient::default(); let gas_price = 0; let gas_limit = 100_000; let maturity = 0; let height = 0; let params = ConsensusParameters::DEFAULT; let mut tx = Transaction::script( gas_price, gas_limit, maturity, vec![], vec![ 28, 255, 255, 255, 112, 255, 255, ], vec![], vec![], vec![], ) .check(height, ¶ms) .expect("failed to generate a checked tx"); client.transact(tx); }
cc @vlopes11 @Voxelot
The text was updated successfully, but these errors were encountered:
related: #170
Sorry, something went wrong.
Bump version to 0.20.2 (#192)
0.20.2
0cb216d
9db323c
2f6edf0
2de865b
Unable to reproduce anymore. Checked the code around MCL(I) and it isn't doing unchecked arithmetic anymore.
No branches or pull requests
Both
GAS_MCL
andGAS_MCLI
fail to handle multiply with overflow.GAS_MCL
:GAS_MCLI
:Here's test cases for both (found with the fuzzing script introduced in #188):
cc @vlopes11 @Voxelot
The text was updated successfully, but these errors were encountered: