From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#1245: 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 Message-ID: <87ljwcsdkt.fsf__7182.22854561663$1224963128$gmane$org@cyd.mit.edu> Reply-To: Chong Yidong , 1245@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1224963061 15190 80.91.229.12 (25 Oct 2008 19:31:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Oct 2008 19:31:01 +0000 (UTC) Cc: 1245@emacsbugs.donarmstrong.com To: emacs-devel@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 25 21:32:02 2008 connect(): Connection refused Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ktorh-0005Fo-Dd for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Oct 2008 21:32:01 +0200 Original-Received: from localhost ([127.0.0.1]:45054 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ktoqb-0003s4-9u for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Oct 2008 15:30:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ktopy-0003NT-Of for bug-gnu-emacs@gnu.org; Sat, 25 Oct 2008 15:30:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ktopw-0003LQ-JE for bug-gnu-emacs@gnu.org; Sat, 25 Oct 2008 15:30:13 -0400 Original-Received: from [199.232.76.173] (port=35033 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ktopv-0003Ku-RM for bug-gnu-emacs@gnu.org; Sat, 25 Oct 2008 15:30:12 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:55016) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ktopu-00029V-61 for bug-gnu-emacs@gnu.org; Sat, 25 Oct 2008 15:30:11 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9PJU2HD001328; Sat, 25 Oct 2008 12:30:03 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m9PJA4Q9029144; Sat, 25 Oct 2008 12:10:04 -0700 X-Loop: don@donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 25 Oct 2008 19:10:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1245 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1245-submit@emacsbugs.donarmstrong.com id=B1245.122496134527092 (code B ref 1245); Sat, 25 Oct 2008 19:10:04 +0000 Original-Received: (at 1245) by emacsbugs.donarmstrong.com; 25 Oct 2008 19:02:25 +0000 Original-Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9PJ2M9h027086 for <1245@emacsbugs.donarmstrong.com>; Sat, 25 Oct 2008 12:02:23 -0700 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 5A50B57E1BA; Sat, 25 Oct 2008 15:02:26 -0400 (EDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 25 Oct 2008 15:30:13 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:21912 Archived-At: > 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