From unknown Sun Aug 17 01:01:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8437: Emacs crash when building with --enable-checking on Mac OS X Resent-From: Ben Key Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Apr 2011 02:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8437 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 8437@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13021438989357 (code B ref -1); Thu, 07 Apr 2011 02:39:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Apr 2011 02:38:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q7f6v-0002Qr-MH for submit@debbugs.gnu.org; Wed, 06 Apr 2011 22:38:18 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q7f6r-0002Qc-59 for submit@debbugs.gnu.org; Wed, 06 Apr 2011 22:38:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7f6k-0003sJ-VZ for submit@debbugs.gnu.org; Wed, 06 Apr 2011 22:38:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:36063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7f6k-0003sF-ST for submit@debbugs.gnu.org; Wed, 06 Apr 2011 22:38:06 -0400 Received: from [140.186.70.92] (port=51335 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7f6j-0007SL-Rp for bug-gnu-emacs@gnu.org; Wed, 06 Apr 2011 22:38:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7f6i-0003ry-Ru for bug-gnu-emacs@gnu.org; Wed, 06 Apr 2011 22:38:05 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:35433) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7f6i-0003ru-K4 for bug-gnu-emacs@gnu.org; Wed, 06 Apr 2011 22:38:04 -0400 Received: by bwz17 with SMTP id 17so1913448bwz.0 for ; Wed, 06 Apr 2011 19:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=NBLJHQPMqqq3L7mcpQqnnKscpHD1eWWZKsk1q5j9oBY=; b=S19L1vdL5nFLl2oj644v3qPZ+AEPZBNPyzflCsCe/v3x9kpCO0qQjgS094rCbfxMie 5nNXawhQxmNEO6Stolm3sD2WqQzBvULQwsMdCg49cJjilnX9/3poiec+MeVmYQfyWtNa /qbCsXZrUS04OxGkeMzM7ALqvV5V23yvkzsZI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=Rkus2cVDVLhZoPG6IfzpZb4lRP1SuKmFL4UPiXaLxWTo49RV9ETdbpJGWo7JufysHq K2FMmAnomXW84GpDDMitXDe5rm1GAammcjsTLQzhXtrzzQZiQYSvkSA9mQxl6GRjzmAQ TkOH2oFxqYGWjlOZsb0lnu+PX5+sJi5qWiWYQ= Received: by 10.204.154.219 with SMTP id p27mr265244bkw.110.1302143882484; Wed, 06 Apr 2011 19:38:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.151.212 with HTTP; Wed, 6 Apr 2011 19:37:42 -0700 (PDT) From: Ben Key Date: Wed, 6 Apr 2011 21:37:42 -0500 Message-ID: Content-Type: multipart/alternative; boundary=0015175cfa1e8fdce504a04affe6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 199.232.76.165 X-Spam-Score: -5.5 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.5 (-----) --0015175cfa1e8fdce504a04affe6 Content-Type: text/plain; charset=ISO-8859-1 When Emacs is configured with --enable-checking=xmallocoverrun on Mac OS X, Emacs crashes during the build process. The error is as follows. temacs(20348,0x7fff70e01ca0) malloc: *** error for object 0x10076c010: Non-aligned pointer being freed (2) *** set a breakpoint in malloc_error_break to debug /bin/sh: line 1: 20348 Abort trap `/bin/pwd`/temacs --batch --load loadup bootstrap make[1]: *** [bootstrap-emacs] Error 1 Note that I set attempted to debug the problem with gdb. I set a breakpoint in malloc_error_break as directed by the error message. The resulting backtrace is as follows. #0 0x00007fff86eed779 in malloc_error_break () #1 0x00007fff86eee8d0 in szone_error () #2 0x000000010020205a in unexec_free (ptr=0x10076c018) at unexmacosx.c:1384 #3 0x0000000100091387 in Fclear_charset_maps () at charset.c:2141 #4 0x00000001001a4b7a in eval_sub (form=4337996870) at eval.c:2360 #5 0x00000001001d7241 in readevalloop (readcharfun=4320321402, stream=0x7fff70e03f40, sourcename=4320479449, printflag=0, unibyte=4320145482, readfun=4320145482, start=4320145482, end=4320145482) at lread.c:1806 #6 0x00000001001d5722 in Fload (file=4320479193, noerror=4320145482, nomessage=4320145482, nosuffix=4320145482, must_suffix=4320145482) at lread.c:1284 #7 0x00000001001a4c5a in eval_sub (form=4320150710) at eval.c:2377 #8 0x00000001001a439b in Feval (form=4320150710, lexical=4320145482) at eval.c:2213 #9 0x00000001000f06c1 in top_level_2 () at keyboard.c:1137 #10 0x00000001001a2a83 in internal_condition_case (bfun=0x1000f06a0 , handlers=4320211690, hfun=0x1000f0169 ) at eval.c:1491 #11 0x00000001000f0709 in top_level_1 (ignore=4320145482) at keyboard.c:1145 #12 0x00000001001a23b1 in internal_catch (tag=4320206362, func=0x1000f06c3 , arg=4320145482) at eval.c:1238 #13 0x00000001000f0603 in command_loop () at keyboard.c:1100 #14 0x00000001000efbf1 in recursive_edit_1 () at keyboard.c:730 #15 0x00000001000efded in Frecursive_edit () at keyboard.c:792 #16 0x00000001000edd46 in main (argc=5, argv=0x7fff5fbff9c8) at emacs.c:1685 Steps to reproduce: 1. Configure Emacs using the following command on Mac OS X. ./configure --enable-checking=xmallocoverrun --with-ns CFLAGS='-g3 -O0' 2. Build Emacs using the following command. make install 3. Emacs crashes when " `/bin/pwd`/temacs --batch --load loadup bootstrap" is called. --0015175cfa1e8fdce504a04affe6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable When Emacs is configured with --enable-checking=3Dxmallocoverrun on Mac OS = X, Emacs crashes during the build process.=A0 The error is as follows.
<= br>temacs(20348,0x7fff70e01ca0) malloc: *** error for object 0x10076c010: N= on-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
/bin/sh: line 1: 203= 48 Abort trap=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 `/bin/pwd`/temacs --ba= tch --load loadup bootstrap
make[1]: *** [bootstrap-emacs] Error 1
Note that I set attempted to debug the problem with gdb.=A0 I set a break= point in malloc_error_break as directed by the error message.=A0 The result= ing backtrace is as follows.

#0=A0 0x00007fff86eed779 in malloc_error_break ()
#= 1=A0 0x00007fff86eee8d0 in szone_error ()
#2=A0 0x000000010020205a in un= exec_free (ptr=3D0x10076c018) at unexmacosx.c:1384
#3=A0 0x0000000100091= 387 in Fclear_charset_maps () at charset.c:2141
#4=A0 0x00000001001a4b7a in eval_sub (form=3D4337996870) at eval.c:2360
= #5=A0 0x00000001001d7241 in readevalloop (readcharfun=3D4320321402, stream= =3D0x7fff70e03f40, sourcename=3D4320479449, printflag=3D0, unibyte=3D432014= 5482, readfun=3D4320145482, start=3D4320145482, end=3D4320145482) at lread.= c:1806
#6=A0 0x00000001001d5722 in Fload (file=3D4320479193, noerror=3D4320145482,= nomessage=3D4320145482, nosuffix=3D4320145482, must_suffix=3D4320145482) a= t lread.c:1284
#7=A0 0x00000001001a4c5a in eval_sub (form=3D4320150710) = at eval.c:2377
#8=A0 0x00000001001a439b in Feval (form=3D4320150710, lexical=3D4320145482)= at eval.c:2213
#9=A0 0x00000001000f06c1 in top_level_2 () at keyboard.c= :1137
#10 0x00000001001a2a83 in internal_condition_case (bfun=3D0x1000f0= 6a0 <top_level_2>, handlers=3D4320211690, hfun=3D0x1000f0169 <cmd_= error>) at eval.c:1491
#11 0x00000001000f0709 in top_level_1 (ignore=3D4320145482) at keyboard.c:1= 145
#12 0x00000001001a23b1 in internal_catch (tag=3D4320206362, func=3D0= x1000f06c3 <top_level_1>, arg=3D4320145482) at eval.c:1238
#13 0x0= 0000001000f0603 in command_loop () at keyboard.c:1100
#14 0x00000001000efbf1 in recursive_edit_1 () at keyboard.c:730
#15 0x00= 000001000efded in Frecursive_edit () at keyboard.c:792
#16 0x00000001000= edd46 in main (argc=3D5, argv=3D0x7fff5fbff9c8) at emacs.c:1685
<= br> Steps to reproduce:

1.=A0 Configure Emacs using the following comman= d on Mac OS X.
=A0=A0=A0 ./configure --enable-checking=3Dxmallocoverrun = --with-ns CFLAGS=3D'-g3 -O0'
2.=A0 Build Emacs using the followi= ng command.
=A0=A0=A0 make install
3.=A0 Emacs crashes when " `/bin/pwd`/temacs= --batch --load loadup bootstrap" is called.

--0015175cfa1e8fdce504a04affe6-- From unknown Sun Aug 17 01:01:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8437: Emacs crash when building with --enable-checking on Mac OS X Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Apr 2011 07:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8437 X-GNU-PR-Package: emacs,ns X-GNU-PR-Keywords: To: Ben Key Cc: 8437@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 8437-submit@debbugs.gnu.org id=B8437.130216152028429 (code B ref 8437); Thu, 07 Apr 2011 07:32:02 +0000 Received: (at 8437) by debbugs.gnu.org; 7 Apr 2011 07:32:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q7jh9-0007OU-VO for submit@debbugs.gnu.org; Thu, 07 Apr 2011 03:32:00 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q7jh8-0007OJ-7h for 8437@debbugs.gnu.org; Thu, 07 Apr 2011 03:31:58 -0400 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Q7jh2-0004DD-Kp; Thu, 07 Apr 2011 03:31:52 -0400 Date: Thu, 07 Apr 2011 03:31:52 -0400 Message-Id: From: Eli Zaretskii In-reply-to: (message from Ben Key on Wed, 6 Apr 2011 21:37:42 -0500) References: X-Spam-Score: -6.5 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > From: Ben Key > Date: Wed, 6 Apr 2011 21:37:42 -0500 > Cc: > > [1:text/plain Hide] > When Emacs is configured with --enable-checking=xmallocoverrun on Mac OS X, > Emacs crashes during the build process. The error is as follows. > > temacs(20348,0x7fff70e01ca0) malloc: *** error for object 0x10076c010: > Non-aligned pointer being freed (2) > *** set a breakpoint in malloc_error_break to debug > /bin/sh: line 1: 20348 Abort trap `/bin/pwd`/temacs --batch > --load loadup bootstrap > make[1]: *** [bootstrap-emacs] Error 1 Thanks. Can you try bisecting to find the commit which introduced this problem? From unknown Sun Aug 17 01:01:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8437: Emacs crash when building with --enable-checking on Mac OS X Resent-From: Ben Key Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Apr 2011 06:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8437 X-GNU-PR-Package: emacs,ns X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 8437@debbugs.gnu.org Received: via spool by 8437-submit@debbugs.gnu.org id=B8437.130258906016563 (code B ref 8437); Tue, 12 Apr 2011 06:18:02 +0000 Received: (at 8437) by debbugs.gnu.org; 12 Apr 2011 06:17:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9Wuy-0004J6-EP for submit@debbugs.gnu.org; Tue, 12 Apr 2011 02:17:40 -0400 Received: from mail-bw0-f44.google.com ([209.85.214.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9Wuw-0004Is-3f for 8437@debbugs.gnu.org; Tue, 12 Apr 2011 02:17:38 -0400 Received: by bwz13 with SMTP id 13so4915424bwz.3 for <8437@debbugs.gnu.org>; Mon, 11 Apr 2011 23:17:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=g9qeBzx6aY3Sa+YtaCtN5pdscMa3daSplHTkRAQ6i5E=; b=BuXf0nGV2utkTJy/Z2GTlt/yGucP0TewSyzrPkkN7hj3L6sVpb4uRbjOEo35Gg3CHz cjy9USEdQC1OebCWu9dG7QaiZeFCiwKVlAKeCnVn87PSrJK0DGDqpL9gD5MKAtYhyjM5 AKwuUzmEo+YXH14Yjkls+r+A9dV02gkht6JGY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=NWkn7c0LoSvmPJB8rlHrMwRJFl42IxwtMmDo90nsc8UH6CQonM5gbiyyx/UK+ePs3E XU9aGDvrpp+gjqMBuJ7FacJOxy8iUTGWkZiTVMW5qh0kC2zF7fClwnjC6RbwuU+uaPvj uzYid8M4Koy2ZtP4J59+hhgxXmmDW3lHG/deU= Received: by 10.204.14.11 with SMTP id e11mr973325bka.185.1302589050176; Mon, 11 Apr 2011 23:17:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.118.203 with HTTP; Mon, 11 Apr 2011 23:17:10 -0700 (PDT) In-Reply-To: References: From: Ben Key Date: Tue, 12 Apr 2011 01:17:10 -0500 Message-ID: Content-Type: multipart/alternative; boundary=00032555aac69fc6d804a0b2a51e X-Spam-Score: -4.4 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.4 (----) --00032555aac69fc6d804a0b2a51e Content-Type: text/plain; charset=ISO-8859-1 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 + + * charset.c (load_charset_map): Don't deref NULL on failed malloc. + Use xmalloc rather than malloc. + 2011-01-30 Paul Eggert 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, --00032555aac69fc6d804a0b2a51e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

I have made an attempt to track down the cause of this bug.
After
=A0 bzr revert -r 103045
Emacs builds when I configure it= with
=A0 ./configure --enable-checking=3Dxmallocoverrun --with-ns CFLAG= S=3D'-g3 -O0'

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

The changes made in revision 103046 are as follows:

=3D=3D=3D mo= dified file 'src/ChangeLog'
--- src/ChangeLog=A0=A0=A0 2011-01-3= 0 23:34:18 +0000
+++ src/ChangeLog=A0=A0=A0 2011-01-31 07:34:45 +0000@@ -1,3 +1,8 @@
+2011-01-31=A0 Jim Meyering=A0 <m= eyering@redhat.com>
+
+=A0=A0=A0 * charset.c (load_charset_map= ): Don't deref NULL on failed malloc.
+=A0=A0=A0 Use xmalloc rather = than malloc.
+
=A02011-01-30=A0 Paul Eggert=A0 <eggert@cs.ucla.edu>
=A0
=A0=A0=A0=A0 strftime: import from= gnulib

=3D=3D=3D modified file 'src/charset.c'
--- src/c= harset.c=A0=A0=A0 2011-01-25 04:08:28 +0000
+++ src/charset.c=A0=A0=A0 2011-01-31 07:34:45 +0000
@@ -292,7 +292,7 @@=
=A0=A0=A0=A0=A0=A0 else
=A0=A0=A0=A0 {
=A0=A0=A0=A0 =A0 if (! tem= p_charset_work)
-=A0=A0=A0 =A0=A0=A0 temp_charset_work =3D malloc (sizeo= f (*temp_charset_work));
+=A0=A0=A0 =A0=A0=A0 temp_charset_work =3D xmal= loc (sizeof (*temp_charset_work));
=A0=A0=A0=A0 =A0 if (control_flag =3D=3D 1)
=A0=A0=A0=A0 =A0=A0=A0 {
= =A0=A0=A0=A0 =A0=A0=A0=A0=A0 memset (temp_charset_work->table.decoder, -= 1,


--00032555aac69fc6d804a0b2a51e-- From unknown Sun Aug 17 01:01:01 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Ben Key Subject: bug#8437: closed (Re: bug#8437: Emacs crash when building with --enable-checking on Mac OS X) Message-ID: References: X-Gnu-PR-Message: they-closed 8437 X-Gnu-PR-Package: emacs,ns Reply-To: 8437@debbugs.gnu.org Date: Tue, 12 Apr 2011 10:25:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1302603902-8682-1" This is a multi-part message in MIME format... ------------=_1302603902-8682-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #8437: Emacs crash when building with --enable-checking on Mac OS X which was filed against the emacs,ns package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 8437@debbugs.gnu.org. --=20 8437: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D8437 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1302603902-8682-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 8437-done) by debbugs.gnu.org; 12 Apr 2011 10:24:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9amC-0002Fe-Lc for submit@debbugs.gnu.org; Tue, 12 Apr 2011 06:24:52 -0400 Received: from mail-out.m-online.net ([212.18.0.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9amA-0002FS-8D for 8437-done@debbugs.gnu.org; Tue, 12 Apr 2011 06:24:51 -0400 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 1572218007BA; Tue, 12 Apr 2011 12:33:04 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 518831C0009F; Tue, 12 Apr 2011 12:24:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id Z4jeI-iEIG5Y; Tue, 12 Apr 2011 12:24:43 +0200 (CEST) Received: from hase (ppp-88-217-125-106.dynamic.mnet-online.de [88.217.125.106]) by mail.mnet-online.de (Postfix) with ESMTP; Tue, 12 Apr 2011 12:24:43 +0200 (CEST) From: Andreas Schwab To: Ben Key Subject: Re: bug#8437: Emacs crash when building with --enable-checking on Mac OS X References: X-Yow: When you said ``HEAVILY FORESTED'' it reminded me of an overdue CLEANING BILL.. Don't you SEE? O'Grogan SWALLOWED a VALUABLE COIN COLLECTION and HAD to murder the ONLY MAN who KNEW!! Date: Tue, 12 Apr 2011 12:24:43 +0200 In-Reply-To: (Ben Key's message of "Tue, 12 Apr 2011 01:17:10 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 8437-done Cc: Eli Zaretskii , 8437-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Should be fixed now. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ------------=_1302603902-8682-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Apr 2011 02:38:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q7f6v-0002Qr-MH for submit@debbugs.gnu.org; Wed, 06 Apr 2011 22:38:18 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q7f6r-0002Qc-59 for submit@debbugs.gnu.org; Wed, 06 Apr 2011 22:38:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7f6k-0003sJ-VZ for submit@debbugs.gnu.org; Wed, 06 Apr 2011 22:38:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:36063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7f6k-0003sF-ST for submit@debbugs.gnu.org; Wed, 06 Apr 2011 22:38:06 -0400 Received: from [140.186.70.92] (port=51335 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7f6j-0007SL-Rp for bug-gnu-emacs@gnu.org; Wed, 06 Apr 2011 22:38:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7f6i-0003ry-Ru for bug-gnu-emacs@gnu.org; Wed, 06 Apr 2011 22:38:05 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:35433) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7f6i-0003ru-K4 for bug-gnu-emacs@gnu.org; Wed, 06 Apr 2011 22:38:04 -0400 Received: by bwz17 with SMTP id 17so1913448bwz.0 for ; Wed, 06 Apr 2011 19:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=NBLJHQPMqqq3L7mcpQqnnKscpHD1eWWZKsk1q5j9oBY=; b=S19L1vdL5nFLl2oj644v3qPZ+AEPZBNPyzflCsCe/v3x9kpCO0qQjgS094rCbfxMie 5nNXawhQxmNEO6Stolm3sD2WqQzBvULQwsMdCg49cJjilnX9/3poiec+MeVmYQfyWtNa /qbCsXZrUS04OxGkeMzM7ALqvV5V23yvkzsZI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=Rkus2cVDVLhZoPG6IfzpZb4lRP1SuKmFL4UPiXaLxWTo49RV9ETdbpJGWo7JufysHq K2FMmAnomXW84GpDDMitXDe5rm1GAammcjsTLQzhXtrzzQZiQYSvkSA9mQxl6GRjzmAQ TkOH2oFxqYGWjlOZsb0lnu+PX5+sJi5qWiWYQ= Received: by 10.204.154.219 with SMTP id p27mr265244bkw.110.1302143882484; Wed, 06 Apr 2011 19:38:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.151.212 with HTTP; Wed, 6 Apr 2011 19:37:42 -0700 (PDT) From: Ben Key Date: Wed, 6 Apr 2011 21:37:42 -0500 Message-ID: Subject: Emacs crash when building with --enable-checking on Mac OS X To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=0015175cfa1e8fdce504a04affe6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 199.232.76.165 X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.5 (-----) --0015175cfa1e8fdce504a04affe6 Content-Type: text/plain; charset=ISO-8859-1 When Emacs is configured with --enable-checking=xmallocoverrun on Mac OS X, Emacs crashes during the build process. The error is as follows. temacs(20348,0x7fff70e01ca0) malloc: *** error for object 0x10076c010: Non-aligned pointer being freed (2) *** set a breakpoint in malloc_error_break to debug /bin/sh: line 1: 20348 Abort trap `/bin/pwd`/temacs --batch --load loadup bootstrap make[1]: *** [bootstrap-emacs] Error 1 Note that I set attempted to debug the problem with gdb. I set a breakpoint in malloc_error_break as directed by the error message. The resulting backtrace is as follows. #0 0x00007fff86eed779 in malloc_error_break () #1 0x00007fff86eee8d0 in szone_error () #2 0x000000010020205a in unexec_free (ptr=0x10076c018) at unexmacosx.c:1384 #3 0x0000000100091387 in Fclear_charset_maps () at charset.c:2141 #4 0x00000001001a4b7a in eval_sub (form=4337996870) at eval.c:2360 #5 0x00000001001d7241 in readevalloop (readcharfun=4320321402, stream=0x7fff70e03f40, sourcename=4320479449, printflag=0, unibyte=4320145482, readfun=4320145482, start=4320145482, end=4320145482) at lread.c:1806 #6 0x00000001001d5722 in Fload (file=4320479193, noerror=4320145482, nomessage=4320145482, nosuffix=4320145482, must_suffix=4320145482) at lread.c:1284 #7 0x00000001001a4c5a in eval_sub (form=4320150710) at eval.c:2377 #8 0x00000001001a439b in Feval (form=4320150710, lexical=4320145482) at eval.c:2213 #9 0x00000001000f06c1 in top_level_2 () at keyboard.c:1137 #10 0x00000001001a2a83 in internal_condition_case (bfun=0x1000f06a0 , handlers=4320211690, hfun=0x1000f0169 ) at eval.c:1491 #11 0x00000001000f0709 in top_level_1 (ignore=4320145482) at keyboard.c:1145 #12 0x00000001001a23b1 in internal_catch (tag=4320206362, func=0x1000f06c3 , arg=4320145482) at eval.c:1238 #13 0x00000001000f0603 in command_loop () at keyboard.c:1100 #14 0x00000001000efbf1 in recursive_edit_1 () at keyboard.c:730 #15 0x00000001000efded in Frecursive_edit () at keyboard.c:792 #16 0x00000001000edd46 in main (argc=5, argv=0x7fff5fbff9c8) at emacs.c:1685 Steps to reproduce: 1. Configure Emacs using the following command on Mac OS X. ./configure --enable-checking=xmallocoverrun --with-ns CFLAGS='-g3 -O0' 2. Build Emacs using the following command. make install 3. Emacs crashes when " `/bin/pwd`/temacs --batch --load loadup bootstrap" is called. --0015175cfa1e8fdce504a04affe6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable When Emacs is configured with --enable-checking=3Dxmallocoverrun on Mac OS = X, Emacs crashes during the build process.=A0 The error is as follows.
<= br>temacs(20348,0x7fff70e01ca0) malloc: *** error for object 0x10076c010: N= on-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
/bin/sh: line 1: 203= 48 Abort trap=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 `/bin/pwd`/temacs --ba= tch --load loadup bootstrap
make[1]: *** [bootstrap-emacs] Error 1
Note that I set attempted to debug the problem with gdb.=A0 I set a break= point in malloc_error_break as directed by the error message.=A0 The result= ing backtrace is as follows.

#0=A0 0x00007fff86eed779 in malloc_error_break ()
#= 1=A0 0x00007fff86eee8d0 in szone_error ()
#2=A0 0x000000010020205a in un= exec_free (ptr=3D0x10076c018) at unexmacosx.c:1384
#3=A0 0x0000000100091= 387 in Fclear_charset_maps () at charset.c:2141
#4=A0 0x00000001001a4b7a in eval_sub (form=3D4337996870) at eval.c:2360
= #5=A0 0x00000001001d7241 in readevalloop (readcharfun=3D4320321402, stream= =3D0x7fff70e03f40, sourcename=3D4320479449, printflag=3D0, unibyte=3D432014= 5482, readfun=3D4320145482, start=3D4320145482, end=3D4320145482) at lread.= c:1806
#6=A0 0x00000001001d5722 in Fload (file=3D4320479193, noerror=3D4320145482,= nomessage=3D4320145482, nosuffix=3D4320145482, must_suffix=3D4320145482) a= t lread.c:1284
#7=A0 0x00000001001a4c5a in eval_sub (form=3D4320150710) = at eval.c:2377
#8=A0 0x00000001001a439b in Feval (form=3D4320150710, lexical=3D4320145482)= at eval.c:2213
#9=A0 0x00000001000f06c1 in top_level_2 () at keyboard.c= :1137
#10 0x00000001001a2a83 in internal_condition_case (bfun=3D0x1000f0= 6a0 <top_level_2>, handlers=3D4320211690, hfun=3D0x1000f0169 <cmd_= error>) at eval.c:1491
#11 0x00000001000f0709 in top_level_1 (ignore=3D4320145482) at keyboard.c:1= 145
#12 0x00000001001a23b1 in internal_catch (tag=3D4320206362, func=3D0= x1000f06c3 <top_level_1>, arg=3D4320145482) at eval.c:1238
#13 0x0= 0000001000f0603 in command_loop () at keyboard.c:1100
#14 0x00000001000efbf1 in recursive_edit_1 () at keyboard.c:730
#15 0x00= 000001000efded in Frecursive_edit () at keyboard.c:792
#16 0x00000001000= edd46 in main (argc=3D5, argv=3D0x7fff5fbff9c8) at emacs.c:1685
<= br> Steps to reproduce:

1.=A0 Configure Emacs using the following comman= d on Mac OS X.
=A0=A0=A0 ./configure --enable-checking=3Dxmallocoverrun = --with-ns CFLAGS=3D'-g3 -O0'
2.=A0 Build Emacs using the followi= ng command.
=A0=A0=A0 make install
3.=A0 Emacs crashes when " `/bin/pwd`/temacs= --batch --load loadup bootstrap" is called.

--0015175cfa1e8fdce504a04affe6-- ------------=_1302603902-8682-1--