unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: npostavs@users.sourceforge.net
To: Michael Ax <michaelax@gmail.com>
Cc: 27504@debbugs.gnu.org
Subject: bug#27504: 25.1; segfault when org-ellipsis is empty
Date: Tue, 27 Jun 2017 08:10:58 -0400	[thread overview]
Message-ID: <878tkdockt.fsf@users.sourceforge.net> (raw)
In-Reply-To: <b7304a0e-e353-ccc7-d371-3ebcafdc34ea@gMail.com> (Michael Ax's message of "Mon, 26 Jun 2017 20:54:20 +0200")

tags 27504 + confirmed
quit

Michael Ax <michaelax@gmail.com> writes:

> (setq org-ellipsis "") C-x C-e
> (org-mode)  C-x C-e
> * asd
> ** def C-p tab  < and boom

I can confirm also with emacs-master.  Below is some debug info, it
looks like next_element_from_display_vector assumes a non-empty ellipsis
display string.

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
0x00000000005823a3 in GLYPH_CODE_P (gc=XIL(0x3)) at ../../emacs-master/src/dispextern.h:1872
1872		  ? (CHARACTERP (XCAR (gc))
(gdb) bt
#0  0x00000000005823a3 in GLYPH_CODE_P (gc=XIL(0x3)) at ../../emacs-master/src/dispextern.h:1872
#1  0x00000000004552b0 in next_element_from_display_vector (it=0x7fffffff8dc0) at ../../emacs-master/src/xdisp.c:7760
#2  0x000000000045705e in next_element_from_buffer (it=0x7fffffff8dc0) at ../../emacs-master/src/xdisp.c:8368
#3  0x0000000000452fc8 in get_next_display_element (it=0x7fffffff8dc0) at ../../emacs-master/src/xdisp.c:6959
#4  0x000000000048601e in display_line (it=0x7fffffff8dc0, cursor_vpos=0) at ../../emacs-master/src/xdisp.c:20840
#5  0x0000000000477a39 in try_window (window=XIL(0x157dc35), pos=..., flags=1) at ../../emacs-master/src/xdisp.c:17482
#6  0x00000000004740a2 in redisplay_window (window=XIL(0x157dc35), just_this_one_p=true) at ../../emacs-master/src/xdisp.c:16929
#7  0x000000000046b3b7 in redisplay_window_1 (window=XIL(0x157dc35)) at ../../emacs-master/src/xdisp.c:14697
#8  0x000000000063dcfe in internal_condition_case_1 (bfun=0x46b375 <redisplay_window_1>, arg=XIL(0x157dc35), handlers=XIL(0xe82dd3), hfun=0x46b2ef <redisplay_window_error>) at ../../emacs-master/src/eval.c:1350
#9  0x000000000046a2c4 in redisplay_internal () at ../../emacs-master/src/xdisp.c:14269
#10 0x0000000000467557 in redisplay () at ../../emacs-master/src/xdisp.c:13378
#11 0x000000000058d580 in read_char (commandflag=1, map=XIL(0x36821b3), prev_event=XIL(0), used_mouse_menu=0x7fffffffe33f, end_time=0x0) at ../../emacs-master/src/keyboard.c:2484
#12 0x000000000059e02b in read_key_sequence (keybuf=0x7fffffffe4d0, bufsize=30, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at ../../emacs-master/src/keyboard.c:9124
#13 0x000000000058a0d0 in command_loop_1 () at ../../emacs-master/src/keyboard.c:1372
#14 0x000000000063dc27 in internal_condition_case (bfun=0x589c9d <command_loop_1>, handlers=XIL(0x4e00), hfun=0x5892f3 <cmd_error>) at ../../emacs-master/src/eval.c:1326
#15 0x00000000005898a2 in command_loop_2 (ignore=XIL(0)) at ../../emacs-master/src/keyboard.c:1114
#16 0x000000000063d164 in internal_catch (tag=XIL(0xbd60), func=0x589879 <command_loop_2>, arg=XIL(0))
    at ../../emacs-master/src/eval.c:1091
#17 0x0000000000589844 in command_loop () at ../../emacs-master/src/keyboard.c:1093
#18 0x0000000000588e08 in recursive_edit_1 () at ../../emacs-master/src/keyboard.c:699
#19 0x0000000000588fe7 in Frecursive_edit () at ../../emacs-master/src/keyboard.c:770
#20 0x0000000000586c74 in main (argc=2, argv=0x7fffffffe9a8) at ../../emacs-master/src/emacs.c:1706

Lisp Backtrace:
"redisplay_internal (C function)" (0x0)
(gdb) p gc
$1 = XIL(0x3)
(gdb) xpr
Lisp_Cons
$2 = (struct Lisp_Cons *) 0x0
Cannot access memory at address 0x0
(gdb) up 1
#1  0x00000000004552b0 in next_element_from_display_vector (it=0x7fffffff8dc0) at ../../emacs-master/src/xdisp.c:7760
7760	  if (GLYPH_CODE_P (gc))
(gdb) p it->dpvec
$3 = (Lisp_Object *) 0x9d4a88 <pure+104>
(gdb) p it->current.dpvec_index 
$4 = 0
(gdb) p it->dpvec[0]
$5 = XIL(0x3)
(gdb) p it->dpvec[1]
$6 = XIL(0xffffffffffffffff)
(gdb) p it->dpend
$7 = (Lisp_Object *) 0x9d4a88 <pure+104>
(gdb) p it->dpvec_char_len 
$8 = 0





  reply	other threads:[~2017-06-27 12:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-26 18:54 bug#27504: 25.1; segfault when org-ellipsis is empty Michael Ax
2017-06-27 12:10 ` npostavs [this message]
2017-06-27 15:49   ` Eli Zaretskii
2017-06-27 16:24 ` Kaushal Modi
2017-06-27 16:29 ` Kaushal Modi
2017-06-28  0:25   ` npostavs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878tkdockt.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=27504@debbugs.gnu.org \
    --cc=michaelax@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).