From: Chong Yidong <cyd@stupidchicken.com>
To: emacs-devel@gnu.org
Cc: 1245@emacsbugs.donarmstrong.com
Subject: Re: define-prefix-command with a name, pressing key sequence bound to it results in memory corruption
Date: Sat, 25 Oct 2008 15:02:26 -0400 [thread overview]
Message-ID: <87ljwcsdkt.fsf@cyd.mit.edu> (raw)
> I have trimmed my .emacs to:
>
> (define-prefix-command 'my-nice-map nil "cOnfigure, Compile, Make, make tEsts, run Tests, trY build, Install, sVn, ctaGs, cscoPe")
> (define-key my-nice-map "c" 'compile)
> (global-set-key [(meta ?m)] 'my-nice-map)
>
> Sometimes, when pressing my key sequence (meta-m) for the prefix
> command, emacs crashes. Sometimes it crashes on the second key
> (e.g. the 'c' following the meta-m). I have also tried with (control
> ?.).
I can reproduce this.
It's strange that realloc fails. If you replacing the xrealloc in
enlarge_buffer_text with xmalloc/bcopy/xfree, Emacs crashes at the call
to malloc.
Anyone have an idea what causes this?
#0 0x00110402 in __kernel_vsyscall ()
#1 0x0049e690 in raise () from /lib/libc.so.6
#2 0x0049ff91 in abort () from /lib/libc.so.6
#3 0x004d69eb in __libc_message () from /lib/libc.so.6
#4 0x004df253 in _int_malloc () from /lib/libc.so.6
#5 0x004e0472 in _int_realloc () from /lib/libc.so.6
#6 0x004e23f7 in realloc () from /lib/libc.so.6
#7 0x0814784d in xrealloc (block=0x0, size=2090) at alloc.c:786
#8 0x0810ef21 in enlarge_buffer_text (b=0x8c2df98, delta=2069)
at buffer.c:5067
#9 0x08118a45 in make_gap_larger (nbytes_added=69) at insdel.c:526
#10 0x08119db0 in insert_1_both (
string=0x8966798 "cOnfigure, Compile, Make, make tEsts, run Tests, trY build, Install, sVn, ctaGs, cscoPe: ", nchars=89, nbytes=89, inherit=1, prepare=0,
before_markers=0) at insdel.c:978
next reply other threads:[~2008-10-25 19:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-25 19:02 Chong Yidong [this message]
2008-10-25 20:25 ` define-prefix-command with a name, pressing key sequence bound to it results in memory corruption Chong Yidong
2008-10-24 23:33 ` bug#1245: " Peter Oberauer
2008-10-25 20:30 ` bug#1245: marked as done (define-prefix-command with a name, pressing key sequence bound to it results in memory corruption) Emacs bug Tracking System
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ljwcsdkt.fsf@cyd.mit.edu \
--to=cyd@stupidchicken.com \
--cc=1245@emacsbugs.donarmstrong.com \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.