From: David van Moolenbroek Date: Fri, 4 Sep 2015 01:19:59 +0000 (+0200) Subject: VM: align frame buffer X-Git-Url: http://zhaoyanbai.com/repos/%22http:/static/doc/zpipe.c?a=commitdiff_plain;h=65c4b82f0262b0bf819c385fc9d0b36740f674ea;p=minix.git VM: align frame buffer Lack of alignment causes minix_stack_fill to produce an incorrect frame layout, subsequently resulting in a crash of the started process. For now, we assume that the other callers of minix_stack_fill do get an aligned buffer through sbrk(3), but this may have to be changed later as well. Change-Id: I1575bd62b050749d1a1aae7417310c91713462c3 --- diff --git a/minix/servers/vm/main.c b/minix/servers/vm/main.c index 884fb43e1..9f939da8c 100644 --- a/minix/servers/vm/main.c +++ b/minix/servers/vm/main.c @@ -346,7 +346,7 @@ static void exec_bootproc(struct vmproc *vmp, struct boot_image *ip) char *argv[] = { ip->proc_name, NULL }; char *envp[] = { NULL }; char *path = ip->proc_name; - char frame[VM_PAGE_SIZE]; + char frame[VM_PAGE_SIZE] __aligned(sizeof(void *)); memset(&vmexeci, 0, sizeof(vmexeci));