Subject: Re: bug#29886: tests/rm/rm-readdir-fail is failing with SIGBUS on Gentoo sparc

From: Paul Eggert <[email-masked]>
Date: Tue, 10 Jul 2018 19:46:16 -0700

Thomas Deutschmann wrote:
> -                p->fts_statp->st_ino = D_INO (dp);
> +                memcpy(&p->fts_statp->st_ino, &dp, sizeof(p->fts_statp->st_ino));

This looks like a kernel bug, not a coreutils bug. readdir must be returning a 
pointer to an misaligned struct. Can you look into that? For example, what 
happens if you insert this:

   if ((intptr_t) (dp) % _Alignof (struct dirent) != 0)
      abort ();

before the memcpy? The 'abort ()' should never happen; if it does, there's a bug 
in readdir, surely.