GNU bug report logs - #8437
Emacs crash when building with --enable-checking on Mac OS X

Previous Next

Packages: ns, emacs;

Reported by: Ben Key <bkey76 <at> gmail.com>

Date: Thu, 7 Apr 2011 02:39:02 UTC

Severity: normal

Done: Andreas Schwab <schwab <at> linux-m68k.org>

Bug is archived. No further changes may be made.

Full log


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

From: Ben Key <bkey76 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 8437 <at> debbugs.gnu.org
Subject: Re: bug#8437: Emacs crash when building with --enable-checking on Mac
	OS X
Date: Tue, 12 Apr 2011 01:17:10 -0500
[Message part 1 (text/plain, inline)]
Hello,

I have made an attempt to track down the cause of this bug.

After
  bzr revert -r 103045
Emacs builds when I configure it with
  ./configure --enable-checking=xmallocoverrun --with-ns CFLAGS='-g3 -O0'

After
  bzr revert -r 103046
the error "temacs(74585,0x7fff70e01ca0) malloc: *** error for object
0x100768010: Non-aligned pointer being freed (2)" occurs during the call to
"`/bin/pwd`/temacs --batch --load loadup bootstrap."

The changes made in revision 103046 are as follows:

=== modified file 'src/ChangeLog'
--- src/ChangeLog    2011-01-30 23:34:18 +0000
+++ src/ChangeLog    2011-01-31 07:34:45 +0000
@@ -1,3 +1,8 @@
+2011-01-31  Jim Meyering  <meyering <at> redhat.com>
+
+    * charset.c (load_charset_map): Don't deref NULL on failed malloc.
+    Use xmalloc rather than malloc.
+
 2011-01-30  Paul Eggert  <eggert <at> cs.ucla.edu>

     strftime: import from gnulib

=== modified file 'src/charset.c'
--- src/charset.c    2011-01-25 04:08:28 +0000
+++ src/charset.c    2011-01-31 07:34:45 +0000
@@ -292,7 +292,7 @@
       else
     {
       if (! temp_charset_work)
-        temp_charset_work = malloc (sizeof (*temp_charset_work));
+        temp_charset_work = xmalloc (sizeof (*temp_charset_work));
       if (control_flag == 1)
         {
           memset (temp_charset_work->table.decoder, -1,
[Message part 2 (text/html, inline)]

This bug report was last modified 14 years and 102 days ago.

Previous Next


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