From: Paul Eggert <eggert@cs.ucla.edu>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Jim Meyering <jim@meyering.net>, 11662@debbugs.gnu.org
Subject: bug#11662: FYI, trunk bootstrap segfaults with nonzero MALLOC_PERTURB_
Date: Fri, 21 Sep 2012 14:05:57 -0700 [thread overview]
Message-ID: <505CD6B5.8070009@cs.ucla.edu> (raw)
In-Reply-To: <4FD8824F.4060501@yandex.ru>
[-- Attachment #1: Type: text/plain, Size: 534 bytes --]
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 <http://bugs.gnu.org/11662>.
[-- Attachment #2: disable_new_vector_alloc.patch --]
[-- Type: text/x-patch, Size: 1707 bytes --]
=== 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
next parent reply other threads:[~2012-09-21 21:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87mx4cxwi1.fsf@rho.meyering.net>
[not found] ` <4FD3D1C5.1020301@cs.ucla.edu>
[not found] ` <4FD8824F.4060501@yandex.ru>
2012-09-21 21:05 ` Paul Eggert [this message]
2012-09-24 8:44 ` bug#11662: FYI, trunk bootstrap segfaults with nonzero MALLOC_PERTURB_ Jim Meyering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=505CD6B5.8070009@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=11662@debbugs.gnu.org \
--cc=dmantipov@yandex.ru \
--cc=jim@meyering.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).