Subject: bug#29031: 25.3; Segmentation fault when starting emacs with my config

From: Kaushal Modi <[email-masked]>
Date: Fri, 27 Oct 2017 21:24:27 +0000

Hello,

I build emacs locally on my machine (on emacs-26 branch now) and that works
fine.

But I got my company CAD to install the latest stable emacs 25.3 and that
is segfaulting as soon as I start.

Here is the backtrace:

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
0x00000033e307a13c in _int_malloc () from /lib64/libc.so.6
(gdb) bt
#0  0x00000033e307a13c in _int_malloc () from /lib64/libc.so.6
#1  0x00000033e307ab1c in malloc () from /lib64/libc.so.6
#2  0x00000000005462ee in lmalloc (size=8188) at alloc.c:1414
#3  lisp_malloc (nbytes=<optimized out>, type=MEM_TYPE_NON_LISP) at
alloc.c:1063
#4  0x00000000005479ef in allocate_string_data (s=0x4e1ea40, nchars=450,
nbytes=451) at alloc.c:1998
#5  0x0000000000547bc7 in make_uninit_multibyte_string (nchars=450,
nbytes=451) at alloc.c:2513
#6  0x0000000000547d46 in make_specified_string (
    contents=0x7fffffff0320 "Full list:\n     (mode-line-space-mode)\n
ez-esc (easy-escape-minor-mode)\n    wr (wrap-region-mode)\n    Undo-Tree
(undo-tree-mode)\n    PgLn (page-break-lines-mode)\n    Outl
(outline-minor-mode)\n    h"..., nchars=<optimized out>, nbytes=451,
multibyte=true)
    at alloc.c:2473
#7  0x000000000055989e in styled_format (nargs=3, args=0x7fffffff1930,
message=<optimized out>) at editfns.c:4551
#8  0x000000000055f843 in Ffuncall (nargs=<optimized out>,
args=0x7fffffff1928) at eval.c:2679
#9  0x000000000059679d in exec_byte_code (bytestr=<optimized out>,
vector=60473349, maxdepth=<optimized out>, args_template=<optimized out>,
    nargs=<optimized out>, args=<optimized out>) at bytecode.c:880
#10 0x000000000055f3fa in funcall_lambda (fun=60473525, nargs=<optimized
out>, arg_vector=0x7fffffff1b10) at eval.c:2929
#11 0x000000000055f743 in Ffuncall (nargs=<optimized out>,
args=0x7fffffff1b08) at eval.c:2760
#12 0x000000000059679d in exec_byte_code (bytestr=<optimized out>,
vector=61071245, maxdepth=<optimized out>, args_template=<optimized out>,
    nargs=<optimized out>, args=<optimized out>) at bytecode.c:880
#13 0x000000000055f3fa in funcall_lambda (fun=61071533, nargs=<optimized
out>, arg_vector=0x7fffffff1c40) at eval.c:2929
#14 0x000000000055e9eb in apply_lambda (fun=61071533, args=0, count=13) at
eval.c:2800
#15 0x000000000055ecb6 in eval_sub (form=<optimized out>) at eval.c:2247
#16 0x0000000000560a92 in Feval (form=61062547, lexical=<optimized out>) at
eval.c:1994
#17 0x000000000055f9c8 in Ffuncall (nargs=<optimized out>,
args=0x7fffffff1dd8) at eval.c:2702
#18 0x000000000055e4ce in internal_condition_case_n (bfun=0x55f5a0
<Ffuncall>, nargs=2, args=0x7fffffff1e90, handlers=<optimized out>,
    hfun=0x447a60 <safe_eval_handler>) at eval.c:1395
#19 0x000000000043ac89 in safe__call (inhibit_quit=true, nargs=2,
func=<optimized out>, ap=<optimized out>) at xdisp.c:2558
#20 0x000000000043ae42 in safe__call1 (inhibit_quit=<optimized out>,
fn=<optimized out>) at xdisp.c:2595
#21 0x000000000044fac3 in safe__eval (sexpr=<optimized out>,
inhibit_quit=true) at xdisp.c:2609
#22 display_mode_element (it=0x7fffffff2340, depth=4, field_width=0,
precision=-82, elt=61062531, props=0, risky=false) at xdisp.c:22863
#23 0x000000000044fc8e in display_mode_element (it=0x7fffffff2340, depth=3,
field_width=0, precision=-82, elt=61138403, props=0, risky=false)
    at xdisp.c:22944
#24 0x000000000044fc8e in display_mode_element (it=0x7fffffff2340, depth=1,
field_width=0, precision=0, elt=61214771, props=0, risky=false)
    at xdisp.c:22944
#25 0x0000000000454af9 in display_mode_line (w=0x11ebac0,
face_id=MODE_LINE_FACE_ID, format=61214963) at xdisp.c:22460
#26 0x0000000000454dee in display_mode_lines (w=0x11ebac0) at xdisp.c:22402
#27 0x00000000004600f7 in redisplay_window (window=18791109,
just_this_one_p=false) at xdisp.c:17066
---Type <return> to continue, or q <return> to quit---
#28 0x0000000000463936 in redisplay_window_0 (window=<optimized out>) at
xdisp.c:14491
#29 0x000000000055e5c6 in internal_condition_case_1 (bfun=0x463910
<redisplay_window_0>, arg=18791109, handlers=<optimized out>, hfun=0x429940
<redisplay_window_error>) at eval.c:1339
#30 0x0000000000445f2e in redisplay_windows (window=<optimized out>) at
xdisp.c:14471
#31 0x000000000045cdd5 in redisplay_internal () at xdisp.c:14031
#32 0x00000000004f5099 in read_char (commandflag=1, map=99214275,
prev_event=0, used_mouse_menu=0x7fffffffb0ff, end_time=0x0) at
keyboard.c:2482
#33 0x00000000004f8ec0 in read_key_sequence (keybuf=0x7fffffffb170,
prompt=0, dont_downcase_last=false, can_return_switch_frame=true,
fix_current_buffer=true, prevent_redisplay=false, bufsize=30) at
keyboard.c:9068
#34 0x00000000004fa1ba in command_loop_1 () at keyboard.c:1370
#35 0x000000000055e62a in internal_condition_case (bfun=0x4f9ff0
<command_loop_1>, handlers=<optimized out>, hfun=0x4f8000 <cmd_error>) at
eval.c:1315
#36 0x00000000004f7fec in command_loop_2 (ignore=<optimized out>) at
keyboard.c:1112
#37 0x000000000055e6b8 in internal_catch (tag=<optimized out>,
func=0x4f7fd0 <command_loop_2>, arg=0) at eval.c:1080
#38 0x00000000004f7d67 in command_loop () at keyboard.c:1091
#39 0x00000000004f7df5 in recursive_edit_1 () at keyboard.c:697
#40 0x00000000004f7f35 in Frecursive_edit () at keyboard.c:768
#41 0x00000000004e977e in main (argc=<optimized out>, argv=<optimized out>)
at emacs.c:1629

Emacs version info:

Emacs version: GNU Emacs 25.3.1 (x86_64-unknown-linux-gnu, GTK+ Version
2.24.23)
 of 2017-10-27

./configure options:
  --prefix=/cad/adi/apps/gnu/linux/x86_64/6/local/emacs/25.3 --with-modules
PKG_CONFIG_PATH=/cad/adi/apps/gnu/linux/x86_64/6/local/emacs/25.3/lib/pkgconfig

Features:
  XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GCONF NOTIFY ACL LIBSELINUX GNUTLS
LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11 MODULES

I cannot understand the backtrace, but I see modeline in there..

My mode line looks like this (picture attached):

Though, it worked fine on emacs-26 (and earlier when we were on emacs 25.x
versions).

I see that the company CAD built emacs is without libotf and imagemagick.
Does this backtrace have anything to do with that?

Thanks.
-- 

Kaushal Modi