From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#11662: FYI, trunk bootstrap segfaults with nonzero MALLOC_PERTURB_ Date: Fri, 21 Sep 2012 14:05:57 -0700 Message-ID: <505CD6B5.8070009@cs.ucla.edu> References: <87mx4cxwi1.fsf@rho.meyering.net> <4FD3D1C5.1020301@cs.ucla.edu> <4FD8824F.4060501@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010907040601020202010801" X-Trace: ger.gmane.org 1348261591 32534 80.91.229.3 (21 Sep 2012 21:06:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Sep 2012 21:06:31 +0000 (UTC) Cc: Jim Meyering , 11662@debbugs.gnu.org To: Dmitry Antipov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 21 23:06:35 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TFAQk-00086G-1x for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Sep 2012 23:06:34 +0200 Original-Received: from localhost ([::1]:51151 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFAQf-0001eO-1H for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Sep 2012 17:06:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFAQb-0001e7-BO for bug-gnu-emacs@gnu.org; Fri, 21 Sep 2012 17:06:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFAQZ-0004Ha-Uq for bug-gnu-emacs@gnu.org; Fri, 21 Sep 2012 17:06:25 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFAQZ-0004HW-RH for bug-gnu-emacs@gnu.org; Fri, 21 Sep 2012 17:06:23 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TFASA-0003mg-FS for bug-gnu-emacs@gnu.org; Fri, 21 Sep 2012 17:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 21:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11662 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11662-submit@debbugs.gnu.org id=B11662.134826166114520 (code B ref 11662); Fri, 21 Sep 2012 21:08:02 +0000 Original-Received: (at 11662) by debbugs.gnu.org; 21 Sep 2012 21:07:41 +0000 Original-Received: from localhost ([127.0.0.1]:47617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFARo-0003m8-Nb for submit@debbugs.gnu.org; Fri, 21 Sep 2012 17:07:41 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:51240) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFARl-0003lz-Dx for 11662@debbugs.gnu.org; Fri, 21 Sep 2012 17:07:38 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 6478B39E8007; Fri, 21 Sep 2012 14:05:58 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pj80vDaTckUk; Fri, 21 Sep 2012 14:05:57 -0700 (PDT) Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 69C9339E8013; Fri, 21 Sep 2012 14:05:57 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 In-Reply-To: <4FD8824F.4060501@yandex.ru> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:64709 Archived-At: This is a multi-part message in MIME format. --------------010907040601020202010801 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 06/13/2012 05:06 AM, Dmitry Antipov wrote: > Not reproduced with MALLOC_PERTURB_219 and MALLOC_CHECK_=[whatever nonzero] > on Fedora 16 with gcc version 4.6.3 20120306 (Red Hat 4.6.3-2) and glibc > 2.14.90-24.fc16.7. > > Can someone try to rule out new vector allocation code with the patch attached > and see whether crash is affected? I have not had a chance to get to this, but am replying now (with a copy of your attached patch) to the bug-reporting address, so that this is properly filed at . --------------010907040601020202010801 Content-Type: text/x-patch; name="disable_new_vector_alloc.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="disable_new_vector_alloc.patch" === modified file 'src/alloc.c' --- src/alloc.c 2012-06-13 00:26:40 +0000 +++ src/alloc.c 2012-06-13 11:21:25 +0000 @@ -491,6 +491,7 @@ memory_full (nbytes); #endif + abort (); /* This used to call error, but if we've run out of memory, we could get infinite recursion trying to build the string. */ xsignal (Qnil, Vmemory_signal_data); @@ -3014,6 +3015,8 @@ { struct vector_block *block; + abort (); + #ifdef DOUG_LEA_MALLOC mallopt (M_MMAP_MAX, 0); #endif @@ -3052,6 +3055,8 @@ struct vector_block *block; size_t index, restbytes; + abort (); + eassert (VBLOCK_BYTES_MIN <= nbytes && nbytes <= VBLOCK_BYTES_MAX); eassert (nbytes % roundup_size == 0); @@ -3135,6 +3140,8 @@ { int free_this_block = 0; + abort (); + for (vector = (struct Lisp_Vector *) block->data; VECTOR_IN_BLOCK (vector, block); vector = next) { @@ -3242,7 +3249,7 @@ nbytes = header_size + len * word_size; - if (nbytes <= VBLOCK_BYTES_MAX) + if (0 && nbytes <= VBLOCK_BYTES_MAX) p = allocate_vector_from_block (vroundup (nbytes)); else { @@ -3785,6 +3792,7 @@ #endif } + abort (); /* This used to call error, but if we've run out of memory, we could get infinite recursion trying to build the string. */ xsignal (Qnil, Vmemory_signal_data); @@ -4369,6 +4377,8 @@ struct vector_block *block = (struct vector_block *) m->start; struct Lisp_Vector *vector = (struct Lisp_Vector *) block->data; + abort (); + /* P is in the block's allocation range. Scan the block up to P and see whether P points to the start of some vector which is not on a free list. FIXME: check whether --------------010907040601020202010801--