GNU bug report logs - #29886
tests/rm/rm-readdir-fail is failing with SIGBUS on Gentoo sparc

Previous Next

Package: coreutils;

Reported by: Thomas Deutschmann <whissi <at> gentoo.org>

Date: Fri, 29 Dec 2017 02:41:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 29886 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Thomas Deutschmann <whissi <at> gentoo.org>, 29886 <at> debbugs.gnu.org
Subject: Re: bug#29886: tests/rm/rm-readdir-fail is failing with SIGBUS on
 Gentoo sparc
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.




This bug report was last modified 7 years and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.