[OpenAFS] AFS 1.8.2 , bus error on FreeBSD
Andreas Ladanyi
andreas.ladanyi@kit.edu
Mon, 15 Apr 2019 14:20:07 +0200
Hi,
this entry in lwp.c helps. No bus error anymore with bos command.
+ /* Gross hack to change stack alignment. */
+ stackptr += 8;
Where is the patch from ?
Andreas
> You may be able to run with this patch:
>
> diff --git a/src/lwp/lwp.c b/src/lwp/lwp.c
> index 496e773e00..0904ebff3e 100644
> --- a/src/lwp/lwp.c
> +++ b/src/lwp/lwp.c
> @@ -353,6 +353,8 @@ LWP_CreateProcess(void *(*ep) (void *), int stacksize,
> int priority, void *parm,
> stackptr = (char *)(8 * (((long)stackmemory + 7) / 8));
> #endif /* !AFS_DARWIN_ENV */
> #endif
> + /* Gross hack to change stack alignment. */
> + stackptr += 8;
> if (priority < 0 || priority >= MAX_PRIORITIES) {
> free(temp);
> #ifndef AFS_AIX32_ENV
>
> If that doesn't work, I'd try compiling (everything) with gcc -O0 and see
> if that helps -- the stack alignment only becomes an issue when some of the
> newer fancy instructions are used.
>
> -Ben
>