Skip to content

Commit

Permalink
Set Config::dynamic_stack_frames=true by default (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrod authored Apr 27, 2022
1 parent 7c22a66 commit e8d6cf0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ impl Default for Config {
disable_deprecated_load_instructions: true,
syscall_bpf_function_hash_collision: true,
reject_callx_r10: true,
dynamic_stack_frames: false,
dynamic_stack_frames: true,
enable_sdiv: true,
optimize_rodata: true,
}
Expand Down
6 changes: 6 additions & 0 deletions tests/ubpf_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2426,10 +2426,16 @@ fn test_string_stack() {

#[test]
fn test_err_fixed_stack_out_of_bound() {
let config = Config {
dynamic_stack_frames: false,
max_call_depth: 3,
..Config::default()
};
test_interpreter_and_jit_asm!(
"
stb [r10-0x4000], 0
exit",
config,
[],
(),
{
Expand Down

0 comments on commit e8d6cf0

Please sign in to comment.