From: David Given Date: Sat, 17 Oct 2015 21:26:49 +0000 (+0200) Subject: Ensure that the break value is aligned. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f4d4af107918ba5162c48b1508664c3033ec33f8;p=FUZIX.git Ensure that the break value is aligned. --- diff --git a/Kernel/syscall_exec16.c b/Kernel/syscall_exec16.c index 7d02b8ec..cd976e71 100644 --- a/Kernel/syscall_exec16.c +++ b/Kernel/syscall_exec16.c @@ -206,7 +206,8 @@ arg_t _execve(void) that on 8bit boxes, but defer it to brk/sbrk() */ uzero((uint8_t *)progptr, bss); - udata.u_break = (int) progptr + bss; // Set initial break for program + // Set initial break for program + udata.u_break = (int)alignup(progptr + bss, sizeof(void*)); /* Turn off caught signals */ memset(udata.u_sigvec, 0, sizeof(udata.u_sigvec));