From 909af97ad0cd2a216d6cfd3cb0e8f9e5bcb466a7 Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Tue, 14 Oct 2025 23:15:26 +0200 Subject: [PATCH] added alloca stack allocation in entry_function_shell --- tools/generate_stencils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/generate_stencils.py b/tools/generate_stencils.py index 0d4a6bf..458de34 100644 --- a/tools/generate_stencils.py +++ b/tools/generate_stencils.py @@ -10,6 +10,7 @@ stencil_func_prefix = '__attribute__((naked)) ' # Remove callee prolog def get_aux_funcs() -> str: return f""" {entry_func_prefix}int entry_function_shell(){{ + void *p = alloca(64); result_int(0); return 1; }} @@ -123,7 +124,7 @@ if __name__ == "__main__": // Auto-generated stencils for copapy // Do not edit manually - #define bool int + include volatile int dummy_int = 1337; volatile float dummy_float = 1337;