aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar smitsohu <smitsohu@gmail.com>2019-11-30 19:32:06 +0100
committerLibravatar GitHub <noreply@github.com>2019-11-30 19:32:06 +0100
commitcbe0d751c9e88485946cf31cf7198921d4a0ce55 (patch)
tree03595e2f981432bd009111e199645ca97013cd23 /src
parentlibreoffice aliasen (diff)
downloadfirejail-cbe0d751c9e88485946cf31cf7198921d4a0ce55.tar.gz
firejail-cbe0d751c9e88485946cf31cf7198921d4a0ce55.tar.zst
firejail-cbe0d751c9e88485946cf31cf7198921d4a0ce55.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/firejail/main.c8
1 files changed, 7 insertions, 1 deletions
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;
55gid_t firejail_gid = 0; 55gid_t firejail_gid = 0;
56 56
57#define STACK_SIZE (1024 * 1024) 57#define STACK_SIZE (1024 * 1024)
58static char child_stack[STACK_SIZE] __attribute__((aligned(8))); // space for child's stack 58#ifdef __arm__
59#define STACK_ALIGNMENT 8 // see #3010
60#else
61#define STACK_ALIGNMENT 16
62#endif
63static char child_stack[STACK_SIZE] __attribute__((aligned(STACK_ALIGNMENT))); // space for child's stack
64
59Config cfg; // configuration 65Config cfg; // configuration
60int arg_private = 0; // mount private /home and /tmp directoryu 66int arg_private = 0; // mount private /home and /tmp directoryu
61int arg_private_cache = 0; // mount private home/.cache 67int arg_private_cache = 0; // mount private home/.cache