GNU bug report logs - #31229
27.0.50; Semantic mode for Python causes segmentation fault

Previous Next

Package: emacs;

Reported by: Stuart <stuart.dilts <at> gmail.com>

Date: Sat, 21 Apr 2018 00:54:02 UTC

Severity: normal

Tags: confirmed

Found in version 27.0.50

Fixed in version 27.1

Done: Glenn Morris <rgm <at> gnu.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 31229 in the body.
You can then email your comments to 31229 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-gnu-emacs <at> gnu.org:
bug#31229; Package emacs. (Sat, 21 Apr 2018 00:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stuart <stuart.dilts <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 21 Apr 2018 00:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stuart <stuart.dilts <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; Semantic mode for Python causes segmentation fault
Date: Fri, 20 Apr 2018 18:20:07 -0600
Emacs segfaults when semantic-mode is enabled in a python buffer. To
reproduce this, place the python code below into a file. I called it 
'the_file.py'.
Then run 'emacs -Q the_file.py', then 'M-x semantic-mode'.

Here's the contents of a file that emacs crashes on:

import sys
import re

def foo(x):
    print(x)
    print("Hello world!")

def bar(x):
    print("I'm a teapot")

class emacs_bug:

    def __init__():
        pass

Output from gdb:

(gdb) run -Q the_file.py
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/local/bin/emacs -Q asdf.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffebceb700 (LWP 13170)]
[New Thread 0x7fffeb077700 (LWP 13171)]
[New Thread 0x7fffea876700 (LWP 13172)]
Detaching after vfork from child process 13173.
Detaching after vfork from child process 13174.

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
0x000000000057c72e in XCDR (c=0x0) at lisp.h:1311
1311 return lisp_h_XCDR (c);



In GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit, Xaw 
scroll bars)
of 2018-04-20 built on linux.local
Repository revision: 495963cfaf535646350051f47c085b84319572f0
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: openSUSE Tumbleweed

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

Configured using:
'configure --with-x-toolkit=lucid --with-modules'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS NOTIFY LIBSELINUX
GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 MODULES
THREADS LIBSYSTEMD JSON

Important settings:
value of $LC_CTYPE: en_US.UTF-8
value of $LANG: en_US.utf8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
line-number-mode: t
transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml
easymenu mml-sec password-cache epa derived epg epg-config gnus-util
rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date elec-pair
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind inotify
dynamic-setting system-font-setting font-render-setting x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 98897 9202)
(symbols 48 20073 1)
(miscs 40 152 120)
(strings 32 29441 2024)
(string-bytes 1 776368)
(vectors 16 15787)
(vector-slots 8 537860 13692)
(floats 8 50 67)
(intervals 56 272 12)
(buffers 992 12))





Added tag(s) confirmed. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 23 Apr 2018 17:01:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31229; Package emacs. (Mon, 23 Apr 2018 17:14:01 GMT) Full text and rfc822 format available.

Message #10 received at 31229 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Stuart <stuart.dilts <at> gmail.com>
Cc: 31229 <at> debbugs.gnu.org, Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#31229: 27.0.50;
 Semantic mode for Python causes segmentation fault
Date: Mon, 23 Apr 2018 13:13:08 -0400
Stuart wrote:

> Emacs segfaults when semantic-mode is enabled in a python buffer. To
> reproduce this, place the python code below into a file. I called it
> the_file.py'.
> Then run 'emacs -Q the_file.py', then 'M-x semantic-mode'.
>
> Here's the contents of a file that emacs crashes on:
>
> import sys
> import re
>
> def foo(x):
>     print(x)
>     print("Hello world!")
>
> def bar(x):
>     print("I'm a teapot")
>
> class emacs_bug:
>
>     def __init__():
>         pass
>

Confirmed on RHEL 7.4 (clicking around the menu bar triggers it for me).
Crashes at lread.c:1777.
Reverting f939cd0 fixes it.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31229; Package emacs. (Mon, 23 Apr 2018 17:39:01 GMT) Full text and rfc822 format available.

Message #13 received at 31229 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Stuart <stuart.dilts <at> gmail.com>
Cc: 31229 <at> debbugs.gnu.org, Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#31229: 27.0.50;
 Semantic mode for Python causes segmentation fault
Date: Mon, 23 Apr 2018 13:38:07 -0400
PS minimal example:

(locate-file-internal "oops" nil)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31229; Package emacs. (Mon, 23 Apr 2018 17:51:01 GMT) Full text and rfc822 format available.

Message #16 received at 31229 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: larsi <at> gnus.org, stuart.dilts <at> gmail.com, 31229 <at> debbugs.gnu.org
Subject: Re: bug#31229: 27.0.50;
 Semantic mode for Python causes segmentation fault
Date: Mon, 23 Apr 2018 20:49:50 +0300
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Mon, 23 Apr 2018 13:13:08 -0400
> Cc: 31229 <at> debbugs.gnu.org, Lars Magne Ingebrigtsen <larsi <at> gnus.org>
> 
> Confirmed on RHEL 7.4 (clicking around the menu bar triggers it for me).
> Crashes at lread.c:1777.
> Reverting f939cd0 fixes it.

Thanks, I tried to fix it.




bug marked as fixed in version 27.1, send any further explanations to 31229 <at> debbugs.gnu.org and Stuart <stuart.dilts <at> gmail.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 23 Apr 2018 18:03:02 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. (Tue, 22 May 2018 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 312 days ago.

Previous Next


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