GNU bug report logs - #6031
gcc 4.5 breaks optimized builds of emacs

Previous Next

Package: notemacs;

Reported by: Elias Pipping <pipping.elias <at> googlemail.com>

Date: Sat, 24 Apr 2010 23:48:02 UTC

Severity: normal

Merged with 6039

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Elias Pipping <pipping.elias <at> googlemail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 6031 <at> debbugs.gnu.org
Subject: bug#6031: gcc 4.5 breaks optimized builds of emacs
Date: Tue, 27 Apr 2010 00:41:21 +0200
On Sun, Apr 25, 2010 at 6:15 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Elias Pipping <pipping.elias <at> googlemail.com>
>> Date: Sun, 25 Apr 2010 16:56:20 +0200
>> Cc: 6031 <at> debbugs.gnu.org
>>
>> (gdb) p text
>> $1 = (struct glyph *) 0x1163000
>> (gdb) p end
>> $2 = (struct glyph *) 0x7ffff73525fa
>
> Hmm... `end' looks entirely bogus to me...  It should have been much
> smalle.  Can you set a watchpoint at the address of row->glyphs[3],
> and see who puts there a non-null value?  Here's how to do that:
>
>   In the crashed session:
>   (gdb) p &row->glyphs[3]
>   $1 = (struct glyph **) 0x12345678
>
>   Start a new session:
>   gdb ./emacs
>   (gdb) start -Q -nw
>   (gdb) watch *(struct glyph **) 0x12345678
>   (gdb) continue
>
> 0x12345678 is of course just an example, you will actually see some
> other value.

(after quite a couple of changes to it):

Hardware watchpoint 2: *(struct glyph **) 0x1126868

Old value = (struct glyph *) 0xa35312d39353838
New value = (struct glyph *) 0x0
0x00007ffff7639f58 in memset () from /lib/libc.so.6
(gdb)

after that, before the watchpoint is hit again, the segfault occurs.

> You should see one change of the value here (line 673 in dispnew.c):
>
>      matrix->rows = (struct glyph_row *) xrealloc (matrix->rows, size);
>      bzero (matrix->rows + matrix->rows_allocated,
>             new_rows * sizeof *matrix->rows);
>
> The value should change to a NULL pointer.  You should then see
> another change in the loop which starts on line 697 in dispnew.c:
>
>      for (i = 0; i < dim.height; ++i)
>
> The value should change from a NULL pointer to something non-null.
>
> There should be some more similar changes.  Please see which one of
> them puts the bogus value 0x7ffff73525fa or some such there.
>
> Thanks.

Kind regards,

Elias




This bug report was last modified 15 years and 57 days ago.

Previous Next


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