GNU bug report logs - #3809
23.1.50; crash in abbrev mode

Previous Next

Package: emacs;

Reported by: Kenichi Handa <handa <at> m17n.org>

Date: Fri, 10 Jul 2009 12:30:03 UTC

Severity: normal

Done: Kenichi Handa <handa <at> m17n.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3809 in the body.
You can then email your comments to 3809 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3809; Package emacs. (Fri, 10 Jul 2009 12:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kenichi Handa <handa <at> m17n.org>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 10 Jul 2009 12:30:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Kenichi Handa <handa <at> m17n.org>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.1.50; crash in abbrev mode
Date: Fri, 10 Jul 2009 21:22:20 +0900
My Emacs (compiled with CFLAGS='-g -DENABLE_CHECKING') has
just crashed as this:

cmds.c:495: Emacs fatal error: assertion failed: SYMBOLP(sym)
[Switching to Thread 0xb70e0700 (LWP 6775)]

Breakpoint 1, abort () at emacs.c:433
(gdb) bt full
#0  abort () at emacs.c:433
No locals.
#1  0x083202c2 in die (msg=0x85ae1ec "assertion failed: SYMBOLP(sym)", file=0x85acc8e "cmds.c", line=495) at alloc.c:6221
No locals.
#2  0x082ce57b in internal_self_insert (c=64, noautofill=0) at cmds.c:495
	modiff = 135
	sym = 164732765
	hairy = 1
	tem = -1080958120
	synt = Spunct
	overwrite = 142900505
	string = 0
	len = 1
	str = "@\000\000\000"
	chars_to_delete = 0
	spaces_to_insert = 0
[...]
(gdb) up 2
(gdb) list
490	      sym = call0 (Qexpand_abbrev);
491	
492	      /* If we expanded an abbrev which has a hook,
493		 and the hook has a non-nil `no-self-insert' property,
494		 return right away--don't really self-insert.  */
495	      if (! NILP (sym) && ! NILP (XSYMBOL (sym)->function)
496		  && SYMBOLP (XSYMBOL (sym)->function))
497		{
498		  Lisp_Object prop;
499		  prop = Fget (XSYMBOL (sym)->function, intern ("no-self-insert"));
(gdb) pp sym
(64 46 37 33 95 45)
(gdb)

FYI, (string 64 46 37 33 95 45) => "@.%!_-".

This is reproducible by this scenario:

% emacs -Q
C-x m
M-x message-mode
handa@

Emacs crashes when I type the last "@" (in To: subject
line).  It seems that "handa" can be any other string.  It
is reproducible with EMACS_23_1_RC branch too.

In the above code, at least we should have a ckeck of
SYMBOLP (sym).

---
Kenichi Handa
handa <at> m17n.org

In GNU Emacs 23.1.50.2 (i686-pc-linux-gnu, GTK+ Version 2.14.4)
 of 2009-07-08 on etlken
Windowing system distributor `The X.Org Foundation', version 11.0.10502000
configured using `configure  'CFLAGS=-g''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ja_JP.UTF-8
  value of $XMODIFIERS: @im=SCIM
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  display-time-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
<escape> x r e p o e r t <backspace> <backspace> <backspace> 
r t <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3809; Package emacs. (Sat, 11 Jul 2009 15:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chong Yidong <cyd <at> stupidchicken.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 11 Jul 2009 15:45:04 GMT) Full text and rfc822 format available.

Message #10 received at 3809 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Kenichi Handa  <handa <at> m17n.org>
Cc: 3809 <at> debbugs.gnu.org
Subject: Re: bug#3809: 23.1.50; crash in abbrev mode
Date: Sat, 11 Jul 2009 10:27:47 -0400
> My Emacs (compiled with CFLAGS='-g -DENABLE_CHECKING') has
> just crashed as this:
>
> % emacs -Q
> C-x m
> M-x message-mode
> handa@
>
> Emacs crashes when I type the last "@" (in To: subject
> line).  It seems that "handa" can be any other string.  It
> is reproducible with EMACS_23_1_RC branch too.

I can't reproduce this, even with CFLAGS='-g -DENABLE_CHECKING'.  But,
you're right about this:

> In the above code, at least we should have a ckeck of
> SYMBOLP (sym).

Could you go ahead and add this check, and if this fixes the crash for
you, please close the bug.  Thanks.



Reply sent to Kenichi Handa <handa <at> m17n.org>:
You have taken responsibility. (Mon, 13 Jul 2009 01:35:05 GMT) Full text and rfc822 format available.

Notification sent to Kenichi Handa <handa <at> m17n.org>:
bug acknowledged by developer. (Mon, 13 Jul 2009 01:35:05 GMT) Full text and rfc822 format available.

Message #15 received at 3809-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Kenichi Handa <handa <at> m17n.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 3809-done <at> debbugs.gnu.org
Subject: Re: bug#3809: 23.1.50; crash in abbrev mode
Date: Mon, 13 Jul 2009 10:28:56 +0900
In article <87zlbbz44c.fsf <at> stupidchicken.com>, Chong Yidong <cyd <at> stupidchicken.com> writes:

> > My Emacs (compiled with CFLAGS='-g -DENABLE_CHECKING') has
> > just crashed as this:
> >
> > % emacs -Q
> > C-x m
> > M-x message-mode
> > handa@
> >
> > Emacs crashes when I type the last "@" (in To: subject
> > line).  It seems that "handa" can be any other string.  It
> > is reproducible with EMACS_23_1_RC branch too.

> I can't reproduce this, even with CFLAGS='-g
> -DENABLE_CHECKING'.

Perhaps, that's because you don't have any alias settings in
~/.mailrc.

> But, you're right about this:

> > In the above code, at least we should have a ckeck of
> > SYMBOLP (sym).

> Could you go ahead and add this check, and if this fixes the crash for
> you, please close the bug.  Thanks.

Ok.  Just done.

---
Kenichi Handa
handa <at> m17n.org



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Mon, 10 Aug 2009 14:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.