unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#31229: 27.0.50; Semantic mode for Python causes segmentation fault
@ 2018-04-21  0:20 Stuart
  2018-04-23 17:13 ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Stuart @ 2018-04-21  0:20 UTC (permalink / raw)
  To: 31229


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))






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#31229: 27.0.50; Semantic mode for Python causes segmentation fault
  2018-04-21  0:20 bug#31229: 27.0.50; Semantic mode for Python causes segmentation fault Stuart
@ 2018-04-23 17:13 ` Glenn Morris
  2018-04-23 17:38   ` Glenn Morris
  2018-04-23 17:49   ` Eli Zaretskii
  0 siblings, 2 replies; 4+ messages in thread
From: Glenn Morris @ 2018-04-23 17:13 UTC (permalink / raw)
  To: Stuart; +Cc: 31229, Lars Magne Ingebrigtsen

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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#31229: 27.0.50; Semantic mode for Python causes segmentation fault
  2018-04-23 17:13 ` Glenn Morris
@ 2018-04-23 17:38   ` Glenn Morris
  2018-04-23 17:49   ` Eli Zaretskii
  1 sibling, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2018-04-23 17:38 UTC (permalink / raw)
  To: Stuart; +Cc: 31229, Lars Magne Ingebrigtsen


PS minimal example:

(locate-file-internal "oops" nil)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#31229: 27.0.50; Semantic mode for Python causes segmentation fault
  2018-04-23 17:13 ` Glenn Morris
  2018-04-23 17:38   ` Glenn Morris
@ 2018-04-23 17:49   ` Eli Zaretskii
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2018-04-23 17:49 UTC (permalink / raw)
  To: Glenn Morris; +Cc: larsi, stuart.dilts, 31229

> From: Glenn Morris <rgm@gnu.org>
> Date: Mon, 23 Apr 2018 13:13:08 -0400
> Cc: 31229@debbugs.gnu.org, Lars Magne Ingebrigtsen <larsi@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-04-23 17:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-21  0:20 bug#31229: 27.0.50; Semantic mode for Python causes segmentation fault Stuart
2018-04-23 17:13 ` Glenn Morris
2018-04-23 17:38   ` Glenn Morris
2018-04-23 17:49   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).