Subject: bug#36166: 27.0.50; Crash visiting HELLO when fringe-mode is disabled

From: Robert Pluim <[email-masked]>
Date: Tue, 11 Jun 2019 10:15:57 +0200

HOME=/tmp src/emacs /tmp/HELLO

where /tmp/.emacs.d/init.el contains:

(custom-set-variables
'(fringe-mode 0 nil (fringe))
 )

and /tmp/HELLO is etc/HELLO with all the non-ASCII removed except for
the line in Maldivian. I donʼt have a font that can display Maldivian.

gdb:

Thread 3 received signal SIGSEGV, Segmentation fault.
ns_compute_glyph_string_overhangs (s=0x7ffeefbfc7e0) at nsterm.m:2941
2941	      if (EQ (font->driver->type, Qns))
(gdb) bt
#0  ns_compute_glyph_string_overhangs (s=0x7ffeefbfc7e0) at nsterm.m:2941
#1  0x0000000100039d74 in draw_glyphs (w=<optimized out>, x=562, row=0x1050c5b00, area=TEXT_AREA, start=0, end=50,
    hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:27050
#2  0x0000000100038e52 in gui_write_glyphs (w=0x105090610, updated_row=0x0, start=<optimized out>,
    updated_area=<optimized out>, len=<optimized out>) at xdisp.c:29207
#3  0x000000010000a38a in update_text_area (w=<optimized out>, updated_row=<optimized out>, vpos=<optimized out>)
    at dispnew.c:3701
#4  update_window_line (w=0x105090610, vpos=<optimized out>, mouse_face_overwritten_p=0x7ffeefbfd8b7) at dispnew.c:3944
#5  0x0000000100004e2e in update_window (w=<optimized out>, force_p=<optimized out>) at dispnew.c:3482
#6  0x0000000100004394 in update_window_tree (w=0x7ffeefbfc7e0, force_p=<optimized out>) at dispnew.c:3220
#7  0x0000000100004378 in update_window_tree (w=0x7ffeefbfc7e0, force_p=<optimized out>) at dispnew.c:3218
#8  0x00000001000041d9 in update_frame (f=0x10508ee35, force_p=<optimized out>, inhibit_hairy_id_p=224) at dispnew.c:3109
#9  0x0000000100028d66 in redisplay_internal () at xdisp.c:14541

'font' is NULL, so the crash is not surprising.

emacs-26 as of 4904fb352c14539e1c6927e8c893abb037bca8a0 crashes the
same way.

In GNU Emacs 27.0.50 (build 43, x86_64-apple-darwin18.6.0, NS appkit-1671.50 Version 10.14.5 (Build 18F132))
 of 2019-06-10 built on rpluim-mac
Repository revision: cdd994b2feeb248d1e02892739c6d6b4d2c5bbdb
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1671
System Description:  Mac OS X 10.14.5

Recent messages:
Annotating...
Redisplaying annotation...done (Spanned from 10247.3 to 5.3 days old)
Annotating... done
Mark saved where search started
Type "q" to restore previous buffer.
Creating customization buffer...
Creating customization items...done
Resetting customization items...done
Creating customization setup...done
ad-handle-definition: `report-emacs-bug' got redefined

Configured using:
 'configure -C'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS THREADS
JSON PDUMPER LCMS2 GMP