[OpenAFS-devel] LWP and clang
chas williams - CONTRACTOR
chas@cmf.nrl.navy.mil
Thu, 17 Oct 2013 08:00:17 -0400
On Wed, 16 Oct 2013 15:39:05 -0400 (EDT)
Benjamin Kaduk <kaduk@MIT.EDU> wrote:
> Yeah, if I tweak rsp before stepping into the listener proc from
> Create_Process_Part2, there's no SIGBUS.
>
> Switching FBSD to use the same block as sys_x86_darwin_80 at line 396 of
> lwp.c lets aklog run to completion. I'm not sure what it will take to
> convince me that this is right for the right reasons, though.
#ifdef sys_x86_darwin_80
savecontext(Create_Process_Part2, &temp2->context, stackptr + stacksize - 16 - sizeof(void *)); /* 16 = 2 * jmp_buf_type */
#else /* !sys_x86_darwin_80 */
/* Need to have the sp on an 8-byte boundary for storing doubles. */
savecontext(Create_Process_Part2, &temp2->context, stackptr + stacksize - 16); /* 16 = 2 * jmp_buf_type */
#endif /* !sys_x86_darwin_80 */
This doesn't do anything special to align the stack data area. If it
is affecting alignment, it would be coincidental.