GNU bug report logs - #20614
Segmentation fault when building on Power8 Little Endian

Previous Next

Package: emacs;

Reported by: Petr Hracek <phracek <at> redhat.com>

Date: Wed, 20 May 2015 07:59:01 UTC

Severity: important

Tags: patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Modra <amodra <at> gmail.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Petr Hracek <phracek <at> redhat.com>, 20614 <at> debbugs.gnu.org
Subject: bug#20614: alignment problem with recent Emacs unexelf.c changes
Date: Tue, 17 Nov 2015 19:33:04 +1030
On Mon, Nov 16, 2015 at 05:59:25PM -0800, Paul Eggert wrote:
> I ran into a porting problem when using Emacs's recent unexelf.c changes in
> a picky build using GCC’s -fsanitize=undefined option. The attached patch
> worked for me, so I installed it into emacs-25. Alan, could you please check
> and/or improve this patch, and/or think about whether there might be similar
> problems elsewhere? Thanks.

The patch looks good to me, and yes, section headers ought to be
aligned to their natural alignment (4 byte for 32-bit object files,
8 byte for 64-bit objects).  .symtab should be kept aligned too, and
your patch accomplishes that as well.  Thanks for fixing this.  No
other alignment requirements come to mind.

Note that the new unexelf.c does not handle objects using .lrodata,
.ldata and .lbss or other "large sections" typically loaded well above
.bss in the address space.  The old unexelf.c didn't handle them
properly either..

-- 
Alan Modra
Australia Development Lab, IBM




This bug report was last modified 9 years and 171 days ago.

Previous Next


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