emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#15907: closed (24.3; Emacs crash due to substitute


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#15907: closed (24.3; Emacs crash due to substitute-command-keys and after-change-functions)
Date: Sat, 16 Nov 2013 10:31:02 +0000

Your message dated Sat, 16 Nov 2013 12:29:36 +0200
with message-id <address@hidden>
and subject line Re: bug#15907: 24.3; Emacs crash due to 
substitute-command-keys and after-change-functions
has caused the debbugs.gnu.org bug report #15907,
regarding 24.3; Emacs crash due to substitute-command-keys and 
after-change-functions
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
15907: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15907
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.3; Emacs crash due to substitute-command-keys and after-change-functions Date: Fri, 15 Nov 2013 21:23:01 +0000 (GMT)
Emacs crashes whenever `substitute-command-keys' is invoked and one of
the functions in `after-change-functions' contains a call similar to
`(format "%s" 1)'.

To reproduce:

1. Start `emacs -Q';
2. Evaluate the following two statements:
       (add-hook 'after-change-functions (lambda (&rest a) (format "%s" 1)))
       (substitute-command-keys "\\{emacs-lisp-mode-map}")
3. That's it. Emacs crashes.

The crash doesn't happen if you replace the number 1 with a string or
a symbol, but it does also happen if you replace it with a list.

This is most annoying as it causes a crash whenever `describe-mode' is
invoked.

In GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.8.2)
 of 2013-08-06 on -mnt-storage-buildroots-staging-i686-eric
Windowing system distributor `The X.Org Foundation', version 11.0.11403000
Configured using:
 `configure '--prefix=/usr' '--sysconfdir=/etc'
 '--libexecdir=/usr/lib' '--localstatedir=/var'
 '--with-x-toolkit=gtk3' '--with-xft' 'CFLAGS=-march=i686
 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4'
 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'
 'CPPFLAGS=-D_FORTIFY_SOURCE=2''
 
Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t
  
Major mode: Summary

Minor modes in effect:
  jabber-activity-mode: t
  global-diff-hl-mode: t
  diff-auto-refine-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  show-paren-mode: t
  savehist-mode: t
  electric-indent-mode: t
  global-auto-complete-mode: t
  google-this-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  yas-global-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  transient-mark-mode: t
  abbrev-mode: t
  
Recent input:
C-h m C-x C-o C-x C-k q q q C-h m <down-mouse-1> <mouse-1> 
C-x C-k C-x C-e C-1 s m a <tab> M-- C-1 C-= s m a <tab> 
<return> C-x C-o P P q C-รง M-x r e p o <tab> C-g <f12> 
M-x r e p o r <tab> m <tab> <backspace> b <tab> <r
eturn>

Artur Malabarba



--- End Message ---
--- Begin Message --- Subject: Re: bug#15907: 24.3; Emacs crash due to substitute-command-keys and after-change-functions Date: Sat, 16 Nov 2013 12:29:36 +0200
> Date: Sat, 16 Nov 2013 11:31:16 +0200
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden
> 
> > 1. Start `emacs -Q';
> > 2. Evaluate the following two statements:
> >        (add-hook 'after-change-functions (lambda (&rest a) (format "%s" 1)))
> >        (substitute-command-keys "\\{emacs-lisp-mode-map}")
> > 3. That's it. Emacs crashes.
> > 
> > The crash doesn't happen if you replace the number 1 with a string or
> > a symbol, but it does also happen if you replace it with a list.
> 
> It no longer crashes after changes in trunk revision 115119.
> 
> > This is most annoying as it causes a crash whenever `describe-mode' is
> > invoked.
> 
> Since you didn't show any real-life use cases, I'm not sure that the
> result is what you wanted, please do check.

Actually, I think you will like revision 115120 much better.  The
underlying problem was that substitute-command-keys sometimes uses an
internal buffer, whose changes would trigger your after-change
function, which would invoke 'format', which uses the same internal
buffer...

As I now think I know what was your real-life problem, and it is now
fixed, I'm closing this bug report.  Feel free to re-open if there are
some leftovers.

Thanks.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]