Skip to content
New issue

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

Disable the secondary stack limit for fuzzing #7195

Merged
merged 1 commit into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion runtime/near-vm-runner/fuzz/fuzz_targets/diffrunner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ fn run_fuzz(code: &ContractCode, vm_kind: VMKind) -> VMResult {
let mut fake_external = MockedExternal::new();
let mut context = create_context(vec![]);
context.prepaid_gas = 10u64.pow(14);
let config = VMConfig::test();
let mut config = VMConfig::test();
config.limit_config.wasmer2_stack_limit = i32::MAX; // If we can crash wasmer2 even without the secondary stack limit it's still good to know
let fees = RuntimeFeesConfig::test();

let promise_results = vec![];
Expand Down
3 changes: 2 additions & 1 deletion runtime/near-vm-runner/fuzz/fuzz_targets/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ fn run_fuzz(code: &ContractCode, vm_kind: VMKind) -> VMResult {
let mut fake_external = MockedExternal::new();
let mut context = create_context(vec![]);
context.prepaid_gas = 10u64.pow(14);
let config = VMConfig::test();
let mut config = VMConfig::test();
config.limit_config.wasmer2_stack_limit = i32::MAX; // If we can crash wasmer2 even without the secondary stack limit it's still good to know
let fees = RuntimeFeesConfig::test();

let promise_results = vec![];
Expand Down
6 changes: 5 additions & 1 deletion runtime/near-vm-runner/src/tests/fuzzers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,13 @@ impl fmt::Debug for ArbitraryModule {

fn run_fuzz(code: &ContractCode, vm_kind: VMKind) -> VMResult {
let mut fake_external = MockedExternal::new();

let mut context = create_context(vec![]);
context.prepaid_gas = 10u64.pow(14);
let config = VMConfig::test();

let mut config = VMConfig::test();
config.limit_config.wasmer2_stack_limit = i32::MAX; // If we can crash wasmer2 even without the secondary stack limit it's still good to know

let fees = RuntimeFeesConfig::test();

let promise_results = vec![];
Expand Down