From cbe0d751c9e88485946cf31cf7198921d4a0ce55 Mon Sep 17 00:00:00 2001 From: smitsohu Date: Sat, 30 Nov 2019 19:32:06 +0100 Subject: fix stack alignment apparently on x86 and on other platforms like aarch64 a 16 byte aligned stack is expected todo: replace this with a generic check --- src/firejail/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/firejail/main.c b/src/firejail/main.c index 1786cfac2..05074e73b 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c @@ -55,7 +55,13 @@ uid_t firejail_uid = 0; gid_t firejail_gid = 0; #define STACK_SIZE (1024 * 1024) -static char child_stack[STACK_SIZE] __attribute__((aligned(8))); // space for child's stack +#ifdef __arm__ +#define STACK_ALIGNMENT 8 // see #3010 +#else +#define STACK_ALIGNMENT 16 +#endif +static char child_stack[STACK_SIZE] __attribute__((aligned(STACK_ALIGNMENT))); // space for child's stack + Config cfg; // configuration int arg_private = 0; // mount private /home and /tmp directoryu int arg_private_cache = 0; // mount private home/.cache -- cgit v1.2.3-54-g00ecf