GNU bug report logs -
#26518
26.0.50; M-x bubbles crashes emacs
Previous Next
Reported by: Stephen Berman <stephen.berman <at> gmx.net>
Date: Sat, 15 Apr 2017 14:14:01 UTC
Severity: normal
Tags: fixed
Found in version 26.0.50
Done: npostavs <at> users.sourceforge.net
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 26518 in the body.
You can then email your comments to 26518 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26518
; Package
emacs
.
(Sat, 15 Apr 2017 14:14:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stephen Berman <stephen.berman <at> gmx.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 15 Apr 2017 14:14:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
0. emacs -Q
1. M-x bubbles
=>
Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
arith_driver (code=code <at> entry=Amult, nargs=nargs <at> entry=2,
args=args <at> entry=0x7fffffffc8c0) at /home/steve/git/emacs-master/src/data.c:2807
2807 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (val);
Full backtrace attached. The crash happens on exiting
bubbles--compute-offsets; stepping through that function with Edebung
shed no light for me. Just before exiting that function I set a
breakpoint at arith_driver if val == 17 (the value on crashing according
to the backtrace), but that also failed to enlighten me. However, when
I repeat the above recipe and between steps 0 and 1 visit bubble.el and
call M-x eval-buffer, then proceed to step 1, there is no crash and
bubbles starts normally. So it looks like some variable is not getting
initialized, but I couldn't find which one.
In GNU Emacs 26.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.22.8)
of 2017-04-15 built on rosalinde
Repository revision: 28718c4449972640c39a7be1b62ccc7f50c6e801
Windowing system distributor 'The X.Org Foundation', version 11.0.11901000
Configured using:
'configure 'CFLAGS=-Og -g3''
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
[bubbles_backtrace (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26518
; Package
emacs
.
(Sat, 15 Apr 2017 14:45:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 26518 <at> debbugs.gnu.org (full text, mbox):
> From: Stephen Berman <stephen.berman <at> gmx.net>
> Date: Sat, 15 Apr 2017 16:13:11 +0200
>
> 0. emacs -Q
> 1. M-x bubbles
> =>
> Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
> arith_driver (code=code <at> entry=Amult, nargs=nargs <at> entry=2,
> args=args <at> entry=0x7fffffffc8c0) at /home/steve/git/emacs-master/src/data.c:2807
> 2807 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (val);
Looks like a problem with the byte compiler/bytecode interpreter,
because both loading bubbles.el from the master branch and loading
bubbles.elc from the release branch works just fine. Also, if I run
Emacs 25.2 on bubbles.elc from master, Emacs complains about an
invalid bytecode.
Vibhav, could this have anything to do with the latest changes in
bytecode?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26518
; Package
emacs
.
(Sat, 15 Apr 2017 15:41:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 26518 <at> debbugs.gnu.org (full text, mbox):
On 15-Apr-2017 8:14 PM, "Eli Zaretskii" <eliz <at> gnu.org> wrote:
> Vibhav, could this have anything to do with the latest changes in
> bytecode?
Indeed, It's an issue with `byte-compile-inline-lapcode` inlining
switch bytecode incorrectly. I've been busy with other stuff lately,
will try fixing this today. Meanwhile, do you think I should set
`byte-compile-cond-use-jump-table` to nil by default to disable
`switch` compilation till this is fixed?
Thanks,
Vibhav
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26518
; Package
emacs
.
(Sat, 15 Apr 2017 16:28:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 26518 <at> debbugs.gnu.org (full text, mbox):
> From: Vibhav Pant <vibhavp <at> gmail.com>
> Date: Sat, 15 Apr 2017 21:10:28 +0530
> Cc: Stephen Berman <stephen.berman <at> gmx.net>, 26518 <at> debbugs.gnu.org
>
> On 15-Apr-2017 8:14 PM, "Eli Zaretskii" <eliz <at> gnu.org> wrote:
> > Vibhav, could this have anything to do with the latest changes in
> > bytecode?
>
> Indeed, It's an issue with `byte-compile-inline-lapcode` inlining
> switch bytecode incorrectly. I've been busy with other stuff lately,
> will try fixing this today.
Thanks.
> Meanwhile, do you think I should set
> `byte-compile-cond-use-jump-table` to nil by default to disable
> `switch` compilation till this is fixed?
If this will be fixed soon, I don't think there will be a need for the
workaround.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26518
; Package
emacs
.
(Sun, 16 Apr 2017 14:57:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 26518 <at> debbugs.gnu.org (full text, mbox):
The following code also crashes Emacs:
(defun fun1 (v)
(car (cond ((eq v 1) '(one . 1))
((eq v 2) '(two . 2))
((eq v 3) '(three . 3)))))
(byte-compile 'fun1)
(defun fun2 (v)
(inline (fun1 v)))
(byte-compile 'fun2)
(fun2 1)
The problem lies in byte-compile-inline-lapcode not being able to
inline bytecode that uses switch, because the peephole optimizer
will often merge tags and convert goto-to-return to returns,
making it impossible restore the correct byte-compile-depth while
inlining it. I can think of two ways to fix this:
Disable certain optimizations for byte-switch code, and allow
the jump table to store certain properties that will make it possible
to inline switch code properly (specifically, the donetag). This could
be done by replacing the hash table with a (DONETAG . JUMP-TABLE) cons
pair (inline-lapcode would use the car, while the bytecode VM would use
it's cdr).
Disable inlining byte-switch code entirely. However, this would impact
performance negatively.
Thoughts?
Regards,
Vibhav
--
Vibhav Pant
vibhavp <at> gmail.com
Added indication that bug 26518 blocks24655
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 17 Apr 2017 17:05:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26518
; Package
emacs
.
(Fri, 21 Apr 2017 12:10:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 26518 <at> debbugs.gnu.org (full text, mbox):
I updated my master branch to include this:
commit b389379c87481b6bc647ceb4d323f861281cad72
Author: Vibhav Pant <vibhavp <at> gmail.com>
Commit: Vibhav Pant <vibhavp <at> gmail.com>
bytecomp: Don't inline functions that use byte-switch (Bug#26518)
and rebuilt, but `M-x bubbles' still made emacs crash with the same
backtrace. I then byte-compiled bubbles.el but still the same crash.
Does this patch require make bootstrap?
Steve Berman
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26518
; Package
emacs
.
(Fri, 21 Apr 2017 12:16:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 26518 <at> debbugs.gnu.org (full text, mbox):
On Fri, Apr 21, 2017 at 5:39 PM, Stephen Berman <stephen.berman <at> gmx.net> wrote:
> I updated my master branch to include this:
>
> commit b389379c87481b6bc647ceb4d323f861281cad72
> Author: Vibhav Pant <vibhavp <at> gmail.com>
> Commit: Vibhav Pant <vibhavp <at> gmail.com>
>
> bytecomp: Don't inline functions that use byte-switch (Bug#26518)
>
> and rebuilt, but `M-x bubbles' still made emacs crash with the same
> backtrace. I then byte-compiled bubbles.el but still the same crash.
> Does this patch require make bootstrap?
I recompile the lisp codebase using `cd lisp; make compile-always -jN`, while
`make bootstrap` should also do the job.
--
Vibhav Pant
vibhavp <at> gmail.com
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26518
; Package
emacs
.
(Fri, 21 Apr 2017 13:39:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 26518 <at> debbugs.gnu.org (full text, mbox):
On Fri, 21 Apr 2017 17:44:20 +0530 Vibhav Pant <vibhavp <at> gmail.com> wrote:
> I recompile the lisp codebase using `cd lisp; make compile-always -jN`, while
That didn't work:
In toplevel form:
~/git/emacs-master/lisp/cedet/ede.el:46:1:Error: Symbol’s function definition is void: cl--copy-slot-descriptor-1
make[3]: *** [Makefile:304: cedet/ede.elc] Error 1
make[3]: Leaving directory '/mnt/data/steve/lib/emacs/lfs/lisp'
make[2]: *** [Makefile:327: compile-main] Error 2
make[2]: Leaving directory '/mnt/data/steve/lib/emacs/lfs/lisp'
make[1]: *** [Makefile:365: compile] Error 2
make[1]: Leaving directory '/mnt/data/steve/lib/emacs/lfs/lisp'
make: *** [Makefile:372: compile-always] Error 2
> `make bootstrap` should also do the job.
It did (I guess the above failure also indicated the need to bootstrap),
and I can now confirm that `M-x bubbles' no longer crashes emacs.
Thanks for the fix.
Steve Berman
Added tag(s) fixed.
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Sat, 22 Apr 2017 21:50:01 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
26518 <at> debbugs.gnu.org and Stephen Berman <stephen.berman <at> gmx.net>
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Sat, 22 Apr 2017 21:50:01 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 21 May 2017 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 32 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.