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 #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thomas Deutschmann <whissi <at> gentoo.org>
To: bug-coreutils <at> gnu.org
Subject: Re: bug#29886: tests/rm/rm-readdir-fail is failing with SIGBUS on
 Gentoo sparc
Date: Tue, 10 Jul 2018 23:46:25 +0200
[Message part 1 (text/plain, inline)]
Hi,

a Gentoo sparc user proposed the following fix:

From: Rolf Eike Beer <eike <at> sf-mail.de>
Date: Tue, 10 Jul 2018 20:14:18 +0200
Subject: [PATCH] fix SIGBUS because of unaligned access in rm

This crashes the rm-readdir-fail test on Gentoo Sparc.

Bug: https://bugs.gentoo.org/642492

--- a/lib/fts.c	2018-06-24 06:52:06.000000000 +0200
+++ b/lib/fts.c	2018-07-10 14:08:32.382614958 +0200
@@ -1551,7 +1551,7 @@ mem1:                           saved_er
 
                 /* Store dirent.d_ino, in case we need to sort
                    entries before processing them.  */
-                p->fts_statp->st_ino = D_INO (dp);
+                memcpy(&p->fts_statp->st_ino, &dp, sizeof(p->fts_statp->st_ino));
 
                 /* Build a file name for fts_stat to stat. */
                 if (ISSET(FTS_NOCHDIR)) {



-- 
Regards,
Thomas Deutschmann / Gentoo Linux Developer
C4DD 695F A713 8F24 2AA1 5638 5849 7EE5 1D5D 74A5

[signature.asc (application/pgp-signature, attachment)]

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.