From 6150a73cc694f8aafbd4b377658539db7ff0201c Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Wed, 6 Mar 2024 08:57:21 -0800 Subject: [PATCH] disable deployment of sol_alloc_free --- programs/bpf_loader/src/syscalls/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/programs/bpf_loader/src/syscalls/mod.rs b/programs/bpf_loader/src/syscalls/mod.rs index a51502f872f95c..dea40c650b0cd6 100644 --- a/programs/bpf_loader/src/syscalls/mod.rs +++ b/programs/bpf_loader/src/syscalls/mod.rs @@ -249,7 +249,10 @@ pub fn morph_program_runtime_environment_v1( let mut result = FunctionRegistry::>::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))