Skip to content

Commit

Permalink
disable deployment of sol_alloc_free
Browse files Browse the repository at this point in the history
  • Loading branch information
pgarg66 committed Mar 6, 2024
1 parent 193173b commit 6150a73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion programs/bpf_loader/src/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ pub fn morph_program_runtime_environment_v1(
let mut result = FunctionRegistry::<BuiltinFunction<InvokeContext>>::default();

for (key, (name, value)) in from.get_function_registry().iter() {
result.register_function(key, name, value)?;
// Deployment of programs with sol_alloc_free is disabled. So do not register the syscall.
if name != &*b"sol_alloc_free_" {
result.register_function(key, name, value)?;
}
}

Ok(BuiltinProgram::new_loader(config, result))
Expand Down

0 comments on commit 6150a73

Please sign in to comment.