From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 19 20:47:44 2020 Received: (at submit) by debbugs.gnu.org; 20 Aug 2020 00:47:45 +0000 Received: from localhost ([127.0.0.1]:41313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8Yk4-0006UL-8l for submit@debbugs.gnu.org; Wed, 19 Aug 2020 20:47:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:46604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8Yk1-0006UC-Jy for submit@debbugs.gnu.org; Wed, 19 Aug 2020 20:47:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8Yk1-0005RR-1y for bug-gnu-emacs@gnu.org; Wed, 19 Aug 2020 20:47:41 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:43887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k8Yjy-00066U-Ao for bug-gnu-emacs@gnu.org; Wed, 19 Aug 2020 20:47:40 -0400 Received: by mail-wr1-x42c.google.com with SMTP id a15so453985wrh.10 for ; Wed, 19 Aug 2020 17:47:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version; bh=iJNsrFdLEyNtf6clJYv9CjgmGTVUuRH6l+vWM5MQAw4=; b=meOM2NfA7TVLLmbw86kads9SzyaguNAY9+G9F4lfaebbWdIbgzmfXtQSIkraSjbcMB ABr+WUAg8NQgkA/GgyoM2EbXzdURju30J4ngoZpnef8Cut5N5l4CvuoCk5gjvJMMDeNn BdajbdBBzO7QGFGjNXLAwUs3Il+X8BzbKuQiOt00hpFY45/WGXV2kHqEqwrJEf0AzF9x A03sKCpFEWoYH2CCvQgAtyQl7tbPDN/ygSUMjQ3/a5TkSun81ZUtGyG69GCgC28zxGyu srBjhBhCh3OKTC54bHJwHvIHRihHBNzsgwDp/wmqRQ+7eRsJnZSj8Fi4N6VU8AA+dTDf aGfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=iJNsrFdLEyNtf6clJYv9CjgmGTVUuRH6l+vWM5MQAw4=; b=cvOZSufQU5/zfJXWNS4H5AJS0F4J1qV//QHIjTMGKUlaYRTe+UCvFTIM8BymzA7ocN 9ZsABV4ZInQSQe+7gYHNvaWF/MxIZxhVse4kzhdpsMFycwN9HayVQ8EVPLe/BXys1UBZ w2hX2Am9hfi/QTJPTOO6JNXe8qX1sHm2SrubfiCfhXwuc3uTM/z2h8nUn/t+lC05D7kC uDg70ymyF5ROe3y0DqT4Jkq7RfnvXLQmC8U0UKIt58AHR1MAKV2hUg3qlj4g6HKLB2GT EL3M+gtGzVryTxM7Dk5U2FrQYKBqFwUFPNEglw3/IPe7u2VB/bzEz2bHHY5+SwSabQ+a 78Vg== X-Gm-Message-State: AOAM530ktePuIgB0eZxy3APqJQLT4tQBlExLzmvWPL7vIeDTqvJIrtPb YUElNoTaq6wyewt5Q6CMZxCBF+zc0cj3Yg== X-Google-Smtp-Source: ABdhPJzal0I7YsoFFDn8i8qE4esfg11lAXbcQbutk97Om5kv/oWJkC7ePj3LKZX8DStmu4CT/QQrfQ== X-Received: by 2002:a5d:420b:: with SMTP id n11mr548635wrq.11.1597884454561; Wed, 19 Aug 2020 17:47:34 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:36e2:16c0:7240:397]) by smtp.gmail.com with ESMTPSA id s20sm937990wmh.21.2020.08.19.17.47.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2020 17:47:33 -0700 (PDT) From: "Basil L. Contovounesios" To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents Date: Thu, 20 Aug 2020 01:47:32 +0100 Message-ID: <877dtuta6z.fsf@tcd.ie> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: none client-ip=2a00:1450:4864:20::42c; envelope-from=contovob@tcd.ie; helo=mail-wr1-x42c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain >From the project-root: 0. cd src 1. gdb ./emacs 2. set logging on 3. r -Q --fg-daemon >From the project-root in another shell: 4. ./lib-src/emacsclient -c 5. C-\ arabic RET 6. s ~ A 7. C-x 5 0 8. ./lib-src/emacsclient -c Back to GDB: 9. bt full I attach the resulting backtrace. I then recompiled ftcrfont.c with the following printf sprinkles: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=printf-debug.diff diff --git a/src/ftcrfont.c b/src/ftcrfont.c index 29813c8d7d..7832d4f5ce 100644 --- b/src/ftcrfont.c +++ a/src/ftcrfont.c @@ -52,11 +52,19 @@ row = glyph / METRICS_NCOLS_PER_ROW; col = glyph % METRICS_NCOLS_PER_ROW; + fprintf (stderr, "\nglyph %u row %d col %d nrows %d", + glyph, row, col, ftcrfont_info->metrics_nrows); if (row >= ftcrfont_info->metrics_nrows) { + fprintf (stderr, " realloc %p %zu", ftcrfont_info->metrics, + sizeof (struct font_metrics *) * (row + 1)); ftcrfont_info->metrics = xrealloc (ftcrfont_info->metrics, sizeof (struct font_metrics *) * (row + 1)); + fprintf (stderr, " memset %p %zu", + ftcrfont_info->metrics + ftcrfont_info->metrics_nrows, + (sizeof (struct font_metrics *) + * (row + 1 - ftcrfont_info->metrics_nrows))); memset (ftcrfont_info->metrics + ftcrfont_info->metrics_nrows, 0, (sizeof (struct font_metrics *) * (row + 1 - ftcrfont_info->metrics_nrows))); @@ -68,10 +76,15 @@ int i; new = xmalloc (sizeof (struct font_metrics) * METRICS_NCOLS_PER_ROW); + fprintf (stderr, " malloc %p %zu", new, + sizeof (struct font_metrics) * METRICS_NCOLS_PER_ROW); for (i = 0; i < METRICS_NCOLS_PER_ROW; i++) METRICS_SET_STATUS (new + i, METRICS_INVALID); ftcrfont_info->metrics[row] = new; } + fprintf (stderr, " m %p r %p c %p\n", ftcrfont_info->metrics, + ftcrfont_info->metrics[row], + ftcrfont_info->metrics[row] + col); cache = ftcrfont_info->metrics[row] + col; if (METRICS_STATUS (cache) == METRICS_INVALID) @@ -503,8 +516,10 @@ } glyphs = alloca (sizeof (cairo_glyph_t) * len); + fprintf (stderr, "sz %zu len %d", sizeof (cairo_glyph_t), len); for (i = 0; i < len; i++) { + fprintf (stderr, " from %d i %d", from, i); glyphs[i].index = s->char2b[from + i]; glyphs[i].x = x; glyphs[i].y = y; --=-=-= Content-Type: text/plain and repeated the recipe. IIRC the segfault didn't happen in step 8 the first time; I had to repeat steps 7-8 a few times before it did, and this generated a lot of output. Here are the last few lines: --8<---------------cut here---------------start------------->8--- glyph 7 row 0 col 7 nrows 1 m 0x5555561a7660 r 0x555556495210 c 0x555556495256 glyph 7 row 0 col 7 nrows 1 m 0x5555561a7660 r 0x555556495210 c 0x555556495256 glyph 63 row 0 col 63 nrows 1 m 0x5555561a7660 r 0x555556495210 c 0x555556495486 sz 24 len 1 from 0 i 0 glyph 3 row 0 col 3 nrows 1 m 0x5555561a7660 r 0x555556495210 c 0x55555649522e sz 24 len 1 from 0 i 0 glyph 1135 row 8 col 111 nrows 10 m 0x5555562304d0 r 0x2073756c50656d55 c 0x2073756c506571ab --8<---------------cut here---------------end--------------->8--- IIRC step 8 segfaulted every time after I removed some of the printfs. Either way, the pattern is always the same: 'glyph' goes from being a small number to 1135 or 1153, and the address of ftcrfont_info->metrics changes. Any ideas? Thanks, -- Basil In GNU Emacs 28.0.50 (build 9, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2020-08-20 built on tabos Repository revision: f8d3d18168a742691d095a3f0c83512f19621725 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Debian GNU/Linux bullseye/sid Configured using: 'configure 'CC=ccache gcc' 'CFLAGS=-O0 -g3 -ggdb -gdwarf-4' --config-cache --prefix=/home/blc/.local --program-suffix=-dbg --enable-checking=yes,glyphs --enable-check-lisp-object-type --with-x-toolkit=lucid --with-file-notification=yes --with-x' Configured features: XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 Important settings: value of $LANG: en_IE.UTF-8 locale-coding-system: utf-8-unix --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=gdb.txt Starting program: /home/blc/.local/src/emacs-dbg/src/emacs -Q --fg-daemon [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff18bf700 (LWP 151164)] [New Thread 0x7ffff10ad700 (LWP 151217)] [New Thread 0x7ffff08ac700 (LWP 151218)] Thread 1 "emacs" received signal SIGSEGV, Segmentation fault. 0x00005555558c001e in ftcrfont_glyph_extents (font=0x5555560ee8d8, glyph=1135, metrics=0x0) at ftcrfont.c:77 77 if (METRICS_STATUS (cache) == METRICS_INVALID) #0 0x00005555558c001e in ftcrfont_glyph_extents (font=0x5555560ee8d8, glyph=1135, metrics=0x0) at ftcrfont.c:77 ftcrfont_info = 0x5555560ee8d8 row = 8 col = 111 cache = 0x3720a1c #1 0x00005555558c16d6 in ftcrfont_draw (s=0x7fffffffb400, from=0, to=1, x=11, y=1006, with_background=false) at ftcrfont.c:511 f = 0x5555560d8570 face = 0x5555561a6860 ftcrfont_info = 0x5555560ee8d8 cr = 0x5555561b5810 glyphs = 0x7fffffffaa20 len = 1 i = 0 #2 0x00005555556dcd4a in x_draw_composite_glyph_string_foreground (s=0x7fffffffb400) at xterm.c:1969 gstring = XIL(0x5555560eea1d) glyph = XIL(0x555556482de5) y = 1006 width = 9 i = 1 j = 0 x = 11 font = 0x5555560ee8d8 #3 0x00005555556e08df in x_draw_glyph_string (s=0x7fffffffb400) at xterm.c:3780 relief_drawn_p = true #4 0x0000555555625aeb in draw_glyphs (w=0x55555656e2d8, x=956, row=0x5555563112a0, area=TEXT_AREA, start=0, end=106, hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:28732 head = 0x7fffffffb6a0 tail = 0x7fffffffade0 s = 0x7fffffffb400 clip_head = 0x0 clip_tail = 0x0 i = 106 j = -1 x_reached = 956 last_x = 955 area_left = 1 f = 0x5555560d8570 sa_avail = 14820 sa_count = 9 #5 0x000055555562cdd0 in gui_write_glyphs (w=0x55555656e2d8, updated_row=0x5555563112a0, start=0x55555636f700, updated_area=TEXT_AREA, len=106) at xdisp.c:30750 x = 61 hpos = 0 chpos = 0 #6 0x000055555559dd23 in update_text_area (w=0x55555656e2d8, updated_row=0x5555563112a0, vpos=61) at dispnew.c:3842 current_row = 0x5555563761a0 desired_row = 0x5555563112a0 rif = 0x555555a03200 changed_p = false #7 0x000055555559e852 in update_window_line (w=0x55555656e2d8, vpos=61, mouse_face_overwritten_p=0x7fffffffbbe7) at dispnew.c:4085 current_row = 0x5555563761a0 desired_row = 0x5555563112a0 rif = 0x555555a03200 changed_p = false #8 0x000055555559d0ed in update_window (w=0x55555656e2d8, force_p=true) at dispnew.c:3566 end = 0x5555563112a0 mode_line_row = 0x5555563112a0 header_line_row = 0x0 changed_p = false mouse_face_overwritten_p = false row = 0x55555630d5a0 tab_line_row = 0x0 yb = 955 n_updated = 0 desired_matrix = 0x55555656daf0 paused_p = false preempt_count = 9 rif = 0x555555a03200 #9 0x000055555559c6d6 in update_window_tree (w=0x55555656e2d8, force_p=true) at dispnew.c:3337 paused_p = false #10 0x000055555559c2bd in update_frame (f=0x5555560d8570, force_p=true, inhibit_hairy_id_p=false) at dispnew.c:3226 paused_p = false root_window = 0x55555656e2d8 #11 0x00005555555f5564 in redisplay_internal () at xdisp.c:15868 gcscrollbars = true f_redisplay_flag = true f = 0x5555560d8570 w = 0x55555656e2d8 sw = 0x55555656e2d8 fr = 0x5555560d8570 pending = false must_finish = true match_p = true tlbufpos = { charpos = 146, bytepos = 146 } tlendpos = { charpos = 0, bytepos = 0 } number_of_visible_frames = 2 count = 6 sf = 0x5555560d8570 polling_stopped_here = true tail = XIL(0x555555f13a33) frame = XIL(0x5555560d8575) hscroll_retries = 0 garbaged_frame_retries = 0 consider_all_windows_p = true update_miniwindow_p = true #12 0x00005555555f6056 in redisplay_preserve_echo_area (from_where=12) at xdisp.c:16137 count = 5 #13 0x0000555555870357 in wait_reading_process_output (time_limit=30, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=XIL(0), wait_proc=0x0, just_wait_proc=0) at process.c:5812 nread = 3375 process_skipped = false channel = 7 nfds = 1 Available = { fds_bits = {0 } } Writeok = { fds_bits = {0 } } check_write = true check_delay = 0 no_avail = false xerrno = 11 proc = XIL(0x55555656e51d) timeout = { tv_sec = 30, tv_nsec = 0 } end_time = { tv_sec = 1597883621, tv_nsec = 52427752 } timer_delay = { tv_sec = 0, tv_nsec = -1 } got_output_end_time = { tv_sec = 0, tv_nsec = -1 } wait = TIMEOUT got_some_output = 3375 prev_wait_proc_nbytes_read = 0 retry_for_async = false count = 4 now = { tv_sec = 0, tv_nsec = -1 } #14 0x00005555555a4ac8 in sit_for (timeout=make_fixnum(30), reading=true, display_option=1) at dispnew.c:6049 sec = 30 nsec = 0 do_display = true #15 0x000055555572c886 in read_char (commandflag=1, map=XIL(0x555556572ac3), prev_event=XIL(0), used_mouse_menu=0x7fffffffd9ef, end_time=0x0) at keyboard.c:2738 tem0 = XIL(0x7fffffffd6a0) timeout = 30 count1 = 3 delay_level = 4 buffer_size = 1 c = XIL(0) jmpcount = 3 local_getcjmp = {{ __jmpbuf = {0, -4276096293224735316, 93824992491632, 0, 0, 0, -4276096293535113812, -7927157738208125524}, __mask_was_saved = 0, __saved_mask = { __val = {93824995017460, 140737488345088, 0, 140737488345168, 93824995064878, 93825009134259, 3, 93825009134243, 93825001707712, 0, 0, 140737488345168, 0, 93825009134259, 0, 140737488345344} } }} save_jump = {{ __jmpbuf = {0, 0, 0, 0, 0, 0, 0, 0}, __mask_was_saved = 0, __saved_mask = { __val = {0 } } }} tem = XIL(0x2ffffd6d8) save = XIL(0x7ffff1c186f8) previous_echo_area_message = XIL(0) also_record = XIL(0) reread = false recorded = false polling_stopped_here = false orig_kboard = 0x555555fa53c0 #16 0x000055555573ed3b in read_key_sequence (keybuf=0x7fffffffdb80, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9547 interrupted_kboard = 0x555555fa53c0 interrupted_frame = 0x555555efeea8 key = XIL(0x7ffff1c186fd) used_mouse_menu = false echo_local_start = 0 last_real_key_start = 0 keys_local_start = 0 new_binding = XIL(0x55555589484d) count = 3 t = 0 echo_start = 0 keys_start = 0 current_binding = XIL(0x555556572ac3) first_unbound = 31 mock_input = 0 used_mouse_menu_history = {false } fkey = { parent = XIL(0x555555f708b3), map = XIL(0x555555f708b3), start = 0, end = 0 } keytran = { parent = XIL(0x7ffff22acc43), map = XIL(0x7ffff22acc43), start = 0, end = 0 } indec = { parent = XIL(0x555555f708c3), map = XIL(0x555555f708c3), start = 0, end = 0 } shift_translated = false delayed_switch_frame = XIL(0) original_uppercase = XIL(0) original_uppercase_position = -1 dummyflag = false starting_buffer = 0x7ffff1c186f8 fake_prefixed_keys = XIL(0) first_event = XIL(0) second_event = XIL(0) #17 0x00005555557282e5 in command_loop_1 () at keyboard.c:1350 cmd = XIL(0x4e60) keybuf = {make_fixnum(24), make_fixnum(53), make_fixnum(48), XIL(0x5555557df79c), XIL(0x1f22c1f30), XIL(0x7ffff22c1f30), XIL(0), XIL(0x8250), XIL(0x7fffffffdbf0), XIL(0), XIL(0x555555e5d8c0), XIL(0), XIL(0x7fffffffdc10), XIL(0x5555557fc2a0), make_fixnum(34910567923712), XIL(0), XIL(0x555555e5d8c0), XIL(0), XIL(0x7fffffffdc40), XIL(0x5555557fc2a0), XIL(0), XIL(0x555555e5d8c0), XIL(0), XIL(0), XIL(0x7fffffffdc60), XIL(0x5555557fc2f4), XIL(0x8), XIL(0x8250), XIL(0x7fffffffdca0), make_fixnum(23456248759793)} i = 3 prev_modiff = 38 prev_buffer = 0x7ffff1c186f8 already_adjusted = false #18 0x0000555555801286 in internal_condition_case (bfun=0x555555727e69 , handlers=XIL(0x90), hfun=0x555555727480 ) at eval.c:1356 val = XIL(0x5555557245c8) c = 0x555555f268e0 #19 0x0000555555727a52 in command_loop_2 (ignore=XIL(0)) at keyboard.c:1091 val = XIL(0xd5f0) #20 0x000055555580073a in internal_catch (tag=XIL(0xd5f0), func=0x555555727a25 , arg=XIL(0)) at eval.c:1117 val = XIL(0) c = 0x555555f10c00 #21 0x00005555557279f1 in command_loop () at keyboard.c:1070 #22 0x0000555555726f69 in recursive_edit_1 () at keyboard.c:714 count = 1 val = XIL(0x7fffffffde10) #23 0x0000555555727160 in Frecursive_edit () at keyboard.c:786 count = 0 buffer = XIL(0) #24 0x0000555555723120 in main (argc=3, argv=0x7fffffffe078) at emacs.c:2047 stack_bottom_variable = 0x7ffff5acd720 no_loadup = false junk = 0x0 dname_arg = 0x0 ch_to_dir = 0x0 original_pwd = 0x0 dump_mode = 0x0 skip_args = 1 temacs = 0x0 attempt_load_pdump = true rlim = { rlim_cur = 10022912, rlim_max = 18446744073709551615 } lc_all = 0x0 sockfd = -1 module_assertions = false Lisp Backtrace: "redisplay_internal (C function)" (0x0) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 20 10:29:03 2020 Received: (at 42943) by debbugs.gnu.org; 20 Aug 2020 14:29:03 +0000 Received: from localhost ([127.0.0.1]:43314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8lYt-0006kt-1c for submit@debbugs.gnu.org; Thu, 20 Aug 2020 10:29:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8lYo-0006kG-MA for 42943@debbugs.gnu.org; Thu, 20 Aug 2020 10:29:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41878) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8lYj-00016m-8R; Thu, 20 Aug 2020 10:28:53 -0400 Received: from [176.228.60.248] (port=1339 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k8lYi-0003GF-49; Thu, 20 Aug 2020 10:28:52 -0400 Date: Thu, 20 Aug 2020 17:28:44 +0300 Message-Id: <83blj5crxf.fsf@gnu.org> From: Eli Zaretskii To: "Basil L. Contovounesios" In-Reply-To: <877dtuta6z.fsf@tcd.ie> (contovob@tcd.ie) Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42943 Cc: 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: "Basil L. Contovounesios" > Date: Thu, 20 Aug 2020 01:47:32 +0100 > > --8<---------------cut here---------------start------------->8--- > glyph 7 row 0 col 7 nrows 1 m 0x5555561a7660 r 0x555556495210 c 0x555556495256 > > glyph 7 row 0 col 7 nrows 1 m 0x5555561a7660 r 0x555556495210 c 0x555556495256 > > glyph 63 row 0 col 63 nrows 1 m 0x5555561a7660 r 0x555556495210 c 0x555556495486 > sz 24 len 1 from 0 i 0 > glyph 3 row 0 col 3 nrows 1 m 0x5555561a7660 r 0x555556495210 c 0x55555649522e > sz 24 len 1 from 0 i 0 > glyph 1135 row 8 col 111 nrows 10 m 0x5555562304d0 r 0x2073756c50656d55 c 0x2073756c506571ab > --8<---------------cut here---------------end--------------->8--- Is 0x2073756c506571ab a bogus pointer, i.e. it cannot be dereferenced? If so, you need to figure out where did it come from. It could have come from the xmalloc call, but then why the trace around that call are not shown in your printfs? And what is sizeof(struct font_metrics) there? I see no printfs which show that, so I can only guess. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 21 10:05:56 2020 Received: (at 42943) by debbugs.gnu.org; 21 Aug 2020 14:05:56 +0000 Received: from localhost ([127.0.0.1]:47901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k97g4-00031B-38 for submit@debbugs.gnu.org; Fri, 21 Aug 2020 10:05:56 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k97g2-00030m-Dd for 42943@debbugs.gnu.org; Fri, 21 Aug 2020 10:05:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dg+v2hV+Zb+i4uSLy4+NpY/ZLPkivNRXQKhjrVpzIJU=; b=JN6/f1sp1781mJ38+q71wl7cUD ZkmwklmReWKjvwAPqyvj5v8RMq8ny3et/vw6J0a6TIBGVKlGajZao6O797U3mKDHyJZcLkfU/CZMd QlcMq6rO/9pbJGJYpJdyP2SarNuNagmBWFlG/J5fGfNlvxAaanmB0xohlIMbkkWooRC4=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k97ft-00051B-7z; Fri, 21 Aug 2020 16:05:47 +0200 From: Lars Ingebrigtsen To: "Basil L. Contovounesios" Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> X-Now-Playing: Boris's _Evol_: "Love" Date: Fri, 21 Aug 2020 16:05:43 +0200 In-Reply-To: <877dtuta6z.fsf@tcd.ie> (Basil L. Contovounesios's message of "Thu, 20 Aug 2020 01:47:32 +0100") Message-ID: <87y2m82ix4.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: I wonder if this is somehow related to bug#42897. Probably not, but two ftcrfont-related crashes are reported within a few days, so perhaps there's a connection... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42943 Cc: 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I wonder if this is somehow related to bug#42897. Probably not, but two ftcrfont-related crashes are reported within a few days, so perhaps there's a connection... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 22 08:42:01 2020 Received: (at 42943) by debbugs.gnu.org; 22 Oct 2020 12:42:01 +0000 Received: from localhost ([127.0.0.1]:51719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVZuq-0004Uu-Qy for submit@debbugs.gnu.org; Thu, 22 Oct 2020 08:42:01 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVZup-0004Uf-7v for 42943@debbugs.gnu.org; Thu, 22 Oct 2020 08:41:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=BAxL3Ai8N6KGwVmW90w4PJx2EUgHchBOK9TO3xmGNYc=; b=eZZQ2LbcA9Sy4YDNv3ybD2DfOu mVtn7JD+XfOhwpBHaFqExNuwZYTDRYxKr21JzWbv+KHR31i8jfkX4fgSQNY8etGSa/QVgMjYIUaU8 nDQxEwlI5RRkVYDXpMCpGZFYaEu4IOSHGcrDlCQiaMElyjcrbE3OcgluOVDBs8ApDtOo=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVZuh-0003Ja-5m; Thu, 22 Oct 2020 14:41:53 +0200 From: Lars Ingebrigtsen To: "Basil L. Contovounesios" Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> X-Now-Playing: LCD Soundsystem's _Freak Out Starry Eyes_: "Freak Out Starry Eyes" Date: Thu, 22 Oct 2020 14:41:49 +0200 In-Reply-To: <87y2m82ix4.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 21 Aug 2020 16:05:43 +0200") Message-ID: <87zh4emnzm.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > I wonder if this is somehow related to bug#42897. Probably not, but two > ftcrfont-related crashes are reported within a few days, so perhaps > there's a connection... Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42943 Cc: 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > I wonder if this is somehow related to bug#42897. Probably not, but two > ftcrfont-related crashes are reported within a few days, so perhaps > there's a connection... Are you still seeing this problem? Pip's fix for bug#41627 may or may not have fixed this problem. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 22 18:11:39 2020 Received: (at 42943) by debbugs.gnu.org; 22 Oct 2020 22:11:39 +0000 Received: from localhost ([127.0.0.1]:54138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVio7-0005ET-HT for submit@debbugs.gnu.org; Thu, 22 Oct 2020 18:11:39 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:39217) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVio6-0005EH-Ef for 42943@debbugs.gnu.org; Thu, 22 Oct 2020 18:11:39 -0400 Received: by mail-wr1-f41.google.com with SMTP id y12so5472824wrp.6 for <42943@debbugs.gnu.org>; Thu, 22 Oct 2020 15:11:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=RmsHmAE+r6fp5+kz5Qv6eHEO2ycFrvnN84gS6xuj86U=; b=gllTAKX6kOs3dY0pDOVp/BwtpL41z2lwf7VPYh0FbrG0k2MJkdhGWwLZt5XlsrNom7 l4LF8539xPUQQwFhnr4B034PVfD3cBCAkFLuiPOI8kB0XJDG9gNN9+etrFRgAQ4Cmu1H tMUnnznZ+3cYqSVl4v6KZVJTtyczy2SpoHhTxJPKOwrcQ3D0yg3esdRzxNOfz1jj/5+u mNBOvRXMtg+xBUy/Skg9XSUexyApg0M51nV+DtGQZzjMB5KlIZsqEcUYBGbgpafdSblc 5fvHpcmr0HvNOytUWKBkIOmxjiLjFoNMdYcb9muEULflUfBZM25+lyMNRhpvRL6m2IZ8 aY7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=RmsHmAE+r6fp5+kz5Qv6eHEO2ycFrvnN84gS6xuj86U=; b=QZcsJzckPCIiD0Cx1ZAT3W2bwAvOjsHwLZB6JkPm7EgXeHsjPjDBQbFs194AEh6wBV NFpleUa63MZQGMUkTixsTLiyV3J//V3rZ0eTfbu7Yt3WjmiyqXTc7pGCjrUM7jbeAVGg 4mt0+V3NN1AkibplpG9aq1sxiXDGjvN7Ql+lVT+R2yGBval8mBTvfr7aXlWkA5Rbv9aI UxHQbummRyf949O+zEbi3Libe9e/JxWVpWlP1a1OzE6SkENBuKQJK6xvWY72n0cAkT24 HfB4OIqaecXpcUIg2r91fmBvju8tU4ydwD8aiqcPokDxGy/5ElUimQOcrLa8BQj8BMuh a0uw== X-Gm-Message-State: AOAM532Ay2tzoBGdRDXII2/Mna8H3rd1aJC2GDNlEX+nn5Z3vHAvOaf2 NCoQwLWoUeN81X5bnWbU6C3/Cg== X-Google-Smtp-Source: ABdhPJxRAkT/dYxRauIgiNTtDs24c9a2jbsPL399qwXMcpSnGqBLmAbr8IXd55rPwksYL6BwnKLa3w== X-Received: by 2002:adf:c3c2:: with SMTP id d2mr4916702wrg.191.1603404692568; Thu, 22 Oct 2020 15:11:32 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:2eb7:a3d:7300:a2fd]) by smtp.gmail.com with ESMTPSA id s5sm5580057wmc.3.2020.10.22.15.11.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 15:11:31 -0700 (PDT) From: "Basil L. Contovounesios" To: Lars Ingebrigtsen Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> Date: Thu, 22 Oct 2020 23:11:30 +0100 In-Reply-To: <87zh4emnzm.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 22 Oct 2020 14:41:49 +0200") Message-ID: <87lffxlxm5.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42943 Cc: 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > Lars Ingebrigtsen writes: > >> I wonder if this is somehow related to bug#42897. Probably not, but two >> ftcrfont-related crashes are reported within a few days, so perhaps >> there's a connection... > > Are you still seeing this problem? Pip's fix for bug#41627 may or may > not have fixed this problem. Sadly, it doesn't seem to have - I still get a segfault, at least in my optimised build of master. Hopefully I'll find some time over the weekend to look into it. Thanks, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 07:24:54 2020 Received: (at 42943) by debbugs.gnu.org; 24 Oct 2020 11:24:54 +0000 Received: from localhost ([127.0.0.1]:32839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWHfJ-00021T-Px for submit@debbugs.gnu.org; Sat, 24 Oct 2020 07:24:54 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:44980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWHfF-00021C-Qm for 42943@debbugs.gnu.org; Sat, 24 Oct 2020 07:24:51 -0400 Received: by mail-wr1-f67.google.com with SMTP id t9so5446792wrq.11 for <42943@debbugs.gnu.org>; Sat, 24 Oct 2020 04:24:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:message-id:mime-version :content-transfer-encoding; bh=M6mXdBKNokKCDFT2hObqWNSTv27NyGGfJ6HKUFo1GQ4=; b=OLAfHVfvOKQLqjkJLmAPwoeDXDvUYKuvvkfCptnDQkp3/edpHHEDatA3+ZqvhPI8Hm jMbtiB7tX4UUAnjO92lxtz2SySAY7OKh1ctJwMpXUxdQi9KGo70oHitO8P+Kk8zPZZVq sJE4qVyDVHsDRu5DDljKxX7Y4OgRPqH3NbzWvEI7zh1Q40E9KdOa88OssQjySQzXp33r j3tOVToOEJEK86di9252nRhtUFZcbpqMMsMrUb7bmpFkqEO8JJodaXSH+ZKGrzvjI3fc nPFKC2AgqM01MNafOoA8yJFe5QouaDzMn0vkgIcBA3nkguzSp1Q5Wc7BGb9BAU4wiIW8 6jMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:message-id :mime-version:content-transfer-encoding; bh=M6mXdBKNokKCDFT2hObqWNSTv27NyGGfJ6HKUFo1GQ4=; b=X29MFz5DGkK1oaVX50vp0pv5qiGnSt6pmTiM/wSGYA9EBYDGbjA7px0NX2eWSU9H4y om+zpvjHNjyNuuChhVpwW/wSSf6xu64fjtfSquX9oSJTgBI/vNW8PyY/Fpwk/c1GG9Xl +BWve2P2VjmKckRTKOnflMIPuXVO4I15CTqVWZ8artpwGmFC9jOhqrqcOMwbcifGOcLv 4uwgkHvo8iP09fPO4Z0Ybi+x+JmfAeHbihCWjjQAFwxtEQc7OaNoSSJtdGJwrUdXPQcM OuEG46M5jQK6ToadlUT/MTAuovJanhLyDa9+VtMANvE20QbeUL4vGVxSeVhBZYlmrz1S +U5A== X-Gm-Message-State: AOAM532FihVQ8XpyrcdJK/O7RpV9M+/GqTxw+H1zbchapS0jGHTUtCIQ 13se9QDoJIbVXTXBkIeoD+A= X-Google-Smtp-Source: ABdhPJy22fGXAlZjVcjgrLkBARaOuxwp4lxaOXo8m4JS4E99NsK8t8VbYzpwSfeWtVTWvhQfElpMpw== X-Received: by 2002:adf:f4ca:: with SMTP id h10mr6984730wrp.89.1603538683893; Sat, 24 Oct 2020 04:24:43 -0700 (PDT) Received: from rpluim-mac ([2a01:e34:ecfc:a860:8d6e:d31:eb45:4a86]) by smtp.gmail.com with ESMTPSA id d30sm10318505wrc.19.2020.10.24.04.24.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Oct 2020 04:24:43 -0700 (PDT) From: Robert Pluim To: "Basil L. Contovounesios" Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> <87lffxlxm5.fsf@tcd.ie> Date: Sat, 24 Oct 2020 13:24:42 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42943 Cc: Lars Ingebrigtsen , 42943@debbugs.gnu.org, eliz@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Thu, 22 Oct 2020 23:11:30 +0100, "Basil L. Contovounesios" said: Basil> Sadly, it doesn't seem to have - I still get a segfault, at leas= t in my Basil> optimised build of master. Hopefully I'll find some time over t= he Basil> weekend to look into it. I can reproduce this with a GTK3 + cairo build. Your recipe is very helpful, in fact just doing 'C-\ arabic RET' is enough to cause the second emacsclient invocation to crash. Running emacs under valgrind shows what's going on, but I don=CA=BCt know how to fix it: =3D=3D9766=3D=3D Invalid read of size 2 =3D=3D9766=3D=3D at 0x3F8FED: ftcrfont_glyph_extents (ftcrfont.c:81) =3D=3D9766=3D=3D by 0x3F93A0: ftcrfont_draw (ftcrfont.c:522) =3D=3D9766=3D=3D by 0x25C67F: x_draw_composite_glyph_string_foreground (= xterm.c:1969) =3D=3D9766=3D=3D by 0x25F9A4: x_draw_glyph_string (xterm.c:3780) =3D=3D9766=3D=3D by 0x1BFC4D: draw_glyphs (xdisp.c:28915) =3D=3D9766=3D=3D by 0x1C65EA: gui_write_glyphs (xdisp.c:30933) =3D=3D9766=3D=3D by 0x15227D: update_text_area (dispnew.c:3849) =3D=3D9766=3D=3D by 0x152C38: update_window_line (dispnew.c:4092) =3D=3D9766=3D=3D by 0x151858: update_window (dispnew.c:3573) =3D=3D9766=3D=3D by 0x151015: update_window_tree (dispnew.c:3344) =3D=3D9766=3D=3D by 0x150C48: update_frame (dispnew.c:3226) =3D=3D9766=3D=3D by 0x19766E: redisplay_internal (xdisp.c:16023) =3D=3D9766=3D=3D Address 0xf36a92e is 126 bytes inside a block of size 1,2= 80 free'd =3D=3D9766=3D=3D at 0x48369AB: free (vg_replace_malloc.c:530) =3D=3D9766=3D=3D by 0x327438: xfree (alloc.c:820) =3D=3D9766=3D=3D by 0x3F9EF4: ftcrfont_close (ftcrfont.c:307) =3D=3D9766=3D=3D by 0x3F9EF4: ftcrfont_close (ftcrfont.c:282) =3D=3D9766=3D=3D by 0x37B285: font_clear_cache (font.c:2648) =3D=3D9766=3D=3D by 0x37B096: font_finish_cache (font.c:2593) =3D=3D9766=3D=3D by 0x37E258: font_update_drivers (font.c:3588) =3D=3D9766=3D=3D by 0x15F56E: delete_frame (frame.c:2093) =3D=3D9766=3D=3D by 0x15FD21: Fdelete_frame (frame.c:2325) =3D=3D9766=3D=3D by 0x35F1FD: funcall_subr (eval.c:2884) =3D=3D9766=3D=3D by 0x35EDE9: Ffuncall (eval.c:2809) =3D=3D9766=3D=3D by 0x356002: Ffuncall_interactively (callint.c:253) =3D=3D9766=3D=3D by 0x35F0FC: funcall_subr (eval.c:2862) =3D=3D9766=3D=3D Block was alloc'd at =3D=3D9766=3D=3D at 0x483577F: malloc (vg_replace_malloc.c:299) =3D=3D9766=3D=3D by 0x327BEB: lmalloc (alloc.c:1359) =3D=3D9766=3D=3D by 0x3272FA: xmalloc (alloc.c:761) =3D=3D9766=3D=3D by 0x3F9093: ftcrfont_glyph_extents (ftcrfont.c:73) =3D=3D9766=3D=3D by 0x3F94B2: ftcrfont_text_extents (ftcrfont.c:371) =3D=3D9766=3D=3D by 0x3803DA: font_fill_lglyph_metrics (font.c:4430) =3D=3D9766=3D=3D by 0x3E1736: fill_gstring_body (composite.c:843) =3D=3D9766=3D=3D by 0x3E42C4: Fcomposition_get_gstring (composite.c:1792) =3D=3D9766=3D=3D by 0x3E1BC3: autocmp_chars (composite.c:912) =3D=3D9766=3D=3D by 0x3E2BCE: composition_reseat_it (composite.c:1269) =3D=3D9766=3D=3D by 0x1858B9: next_element_from_string (xdisp.c:8578) =3D=3D9766=3D=3D by 0x1854C6: next_element_from_string (xdisp.c:8504) The call to ftcrfont_glyph_extents is from here: static int ftcrfont_draw (struct glyph_string *s, int from, int to, int x, int y, bool with_background) { struct frame *f =3D s->f; struct face *face =3D s->face; struct font_info *ftcrfont_info =3D (struct font_info *) s->font; So this means that the struct glyph_string here still refers to the font from the previous frame, which has been closed. I=CA=BCm not sure how to get it to refer to the right font on the new frame. Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 07:46:52 2020 Received: (at 42943) by debbugs.gnu.org; 24 Oct 2020 11:46:53 +0000 Received: from localhost ([127.0.0.1]:32846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWI0a-0004fb-MJ for submit@debbugs.gnu.org; Sat, 24 Oct 2020 07:46:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWI0Z-0004fO-BW for 42943@debbugs.gnu.org; Sat, 24 Oct 2020 07:46:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45623) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWI0S-0003Sy-9S; Sat, 24 Oct 2020 07:46:45 -0400 Received: from [176.228.60.248] (port=3136 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kWI0R-0007Wj-II; Sat, 24 Oct 2020 07:46:43 -0400 Date: Sat, 24 Oct 2020 14:46:29 +0300 Message-Id: <83lffvhmne.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-Reply-To: (message from Robert Pluim on Sat, 24 Oct 2020 13:24:42 +0200) Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> <87lffxlxm5.fsf@tcd.ie> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42943 Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Robert Pluim > Cc: Lars Ingebrigtsen , 42943@debbugs.gnu.org, eliz@gnu.org > Date: Sat, 24 Oct 2020 13:24:42 +0200 > > The call to ftcrfont_glyph_extents is from here: > > static int > ftcrfont_draw (struct glyph_string *s, > int from, int to, int x, int y, bool with_background) > { > struct frame *f = s->f; > struct face *face = s->face; > struct font_info *ftcrfont_info = (struct font_info *) s->font; > > So this means that the struct glyph_string here still refers to the > font from the previous frame, which has been closed. Iʼm not sure how > to get it to refer to the right font on the new frame. I'm guessing that we close the font, but there's still a face that references that font, and we try using that face for display. Can you see if that is the case? The 'face' member of 'struct glyph_string' should point to the face, and face->font should point to the font. We call font_clear_cache when a frame is deleted, so it's unclear to me how come the font is still remembered somewhere. And I lack some background here: what is/are the character(s) we try displaying here, and how that display is triggered by creating a new frame due to the second emacsclient invocation? From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 08:15:04 2020 Received: (at 42943) by debbugs.gnu.org; 24 Oct 2020 12:15:05 +0000 Received: from localhost ([127.0.0.1]:32867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWIRs-0005Nk-JQ for submit@debbugs.gnu.org; Sat, 24 Oct 2020 08:15:04 -0400 Received: from mail-wr1-f54.google.com ([209.85.221.54]:43931) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWIRp-0005Mw-II for 42943@debbugs.gnu.org; Sat, 24 Oct 2020 08:15:02 -0400 Received: by mail-wr1-f54.google.com with SMTP id g12so5586902wrp.10 for <42943@debbugs.gnu.org>; Sat, 24 Oct 2020 05:15:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=+dW6NJRGqeBDHvh+xSTX38Iua9EKTmHg73ePAk0rIAo=; b=YeGuEoDUq/ouAQem6pCF/dzGFK4xECfKy547TBUsqvtfeUMDjoNXnoj5CCEiJgXNYb RiUXCysW9UdgrF7e+uA60cEW/Jab90Ez6y8Z0H+ZGB0pFqyDRJEQQiC8nFmJqPsNKXt7 hN+jpbka/yrGNfpC0/CD8uRqin/29rqZWVFo9HW/B61ncXUDHSOZGlDJyJK1mtDTcmbz TgKb7MuWnP32Bt5wMoPpbh210cE4H4fB9JtyxbfgGRygugcUbFKhG0z/GXyJeND4m3W2 AbeneCTcr10DgX4EF9d3zuH9D2IIGhpcUjl87pODLcHG3t/RNtoJpJd2w3hP07xQyY1m SoTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=+dW6NJRGqeBDHvh+xSTX38Iua9EKTmHg73ePAk0rIAo=; b=EP5o17iTle8yBD3nrPC01A9WmpVnpi4cLOQLzi9/1wWriYeozcgDLQFeAMJiaaucif rGPus1AtitMGPlyzQsGTrX325JXvsJTsNJ0azbpuAZPZP26b2ZoKHguJadk21OaA/xQG gus72IltALvGcTYtI/JM2qusgeXBfZsCntAAXMcWb9MZr9yevAFeTtvVvNcYbvG39npR h5ojemPeFWt+e8m5jyiVT5lnx1XhWltD01Q4ymfTmlbwmh0RUr3iqFsSaIzVKY/rMBx0 jDxe3HhnRRLrAxFpcgr93QtAx/1xvpF1g/i62CBvYenb+rvW4Bi7iKuOUJfz0mv7By8E eB8A== X-Gm-Message-State: AOAM531PmMgD9d0KHun6ZxmAYgHD5R2EbuuadsU9wEgkNvpU8AD+iLjo dTRzx/YCHZ/86rp4XPpBz3HWFcR2E9M= X-Google-Smtp-Source: ABdhPJwrHiNfmH6UNNSmatWWJ2Gebt/C4QFM5/tBW2ZDSc7Z2icnPzRK3uXgRo6S2sOThA4wrtKqHA== X-Received: by 2002:adf:f7d1:: with SMTP id a17mr7379371wrq.396.1603541695249; Sat, 24 Oct 2020 05:14:55 -0700 (PDT) Received: from rpluim-mac ([2a01:e34:ecfc:a860:8d6e:d31:eb45:4a86]) by smtp.gmail.com with ESMTPSA id o4sm9918159wrv.8.2020.10.24.05.14.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Oct 2020 05:14:54 -0700 (PDT) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> <87lffxlxm5.fsf@tcd.ie> <83lffvhmne.fsf@gnu.org> Date: Sat, 24 Oct 2020 14:14:53 +0200 In-Reply-To: <83lffvhmne.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 24 Oct 2020 14:46:29 +0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42943 Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Sat, 24 Oct 2020 14:46:29 +0300, Eli Zaretskii said: >> From: Robert Pluim >> Cc: Lars Ingebrigtsen , 42943@debbugs.gnu.org, eliz= @gnu.org >> Date: Sat, 24 Oct 2020 13:24:42 +0200 >>=20 >> The call to ftcrfont_glyph_extents is from here: >>=20 >> static int >> ftcrfont_draw (struct glyph_string *s, >> int from, int to, int x, int y, bool with_background) >> { >> struct frame *f =3D s->f; >> struct face *face =3D s->face; >> struct font_info *ftcrfont_info =3D (struct font_info *) s->font; >>=20 >> So this means that the struct glyph_string here still refers to the >> font from the previous frame, which has been closed. I=CA=BCm not su= re how >> to get it to refer to the right font on the new frame. Eli> I'm guessing that we close the font, but there's still a face that Eli> references that font, and we try using that face for display. Can= you Eli> see if that is the case? The 'face' member of 'struct glyph_strin= g' Eli> should point to the face, and face->font should point to the font. Yes, we=CA=BCre using the face that=CA=BCs cached in the glyph_string: Thread 1 "emacs" received signal SIGSEGV, Segmentation fault. ftcrfont_glyph_extents (font=3D0x555556930478, glyph=3D1036, metrics=3Dmetrics@entry=3D0x0) at ftcrfont.c:81 81 if (METRICS_STATUS (cache) =3D=3D METRICS_INVALID) (gdb) up #1 0x00005555558453a1 in ftcrfont_draw (s=3D0x7fffffffb440, from=3D, to=3D, x=3D17, y=3D, with_background=3D) at ftcrfont.c:520 520 x +=3D (s->padding_p ? 1 : ftcrfont_glyph_extents (s->font, (gdb) l 500 495 struct face *face =3D s->face; 496 struct font_info *ftcrfont_info =3D (struct font_info *) s->font; 497 cairo_t *cr; 498 cairo_glyph_t *glyphs; 499 int len =3D to - from; 500 int i; 501 502 block_input (); 503 504 cr =3D x_begin_cr_clip (f, s->gc); (gdb) p s->face $1 =3D (struct face *) 0x555556113290 (gdb) p s->face->font $2 =3D (struct font *) 0x555556930478 (gdb) p s->font $3 =3D (struct font *) 0x555556930478 (this is from a separate run from the valgrind one) Eli> We call font_clear_cache when a frame is deleted, so it's unclear = to Eli> me how come the font is still remembered somewhere. font_clear_cache closes all the fonts and sets the frame's font cache to Qnil, I don=CA=BCt see it doing anything with faces. Eli> And I lack some background here: what is/are the character(s) we t= ry Eli> displaying here, and how that display is triggered by creating a n= ew Eli> frame due to the second emacsclient invocation? It=CA=BCs just emacsclient redisplaying *scratch*, I think. Are you saying = redisplay should not be called here? Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 09:10:54 2020 Received: (at 42943) by debbugs.gnu.org; 24 Oct 2020 13:10:54 +0000 Received: from localhost ([127.0.0.1]:32947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWJJt-0006q4-Cn for submit@debbugs.gnu.org; Sat, 24 Oct 2020 09:10:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWJJq-0006pW-DB for 42943@debbugs.gnu.org; Sat, 24 Oct 2020 09:10:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46440) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWJJk-0004Y1-NX; Sat, 24 Oct 2020 09:10:44 -0400 Received: from [176.228.60.248] (port=4330 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kWJJk-0005f0-5r; Sat, 24 Oct 2020 09:10:44 -0400 Date: Sat, 24 Oct 2020 16:10:31 +0300 Message-Id: <83imazhirc.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-Reply-To: (message from Robert Pluim on Sat, 24 Oct 2020 14:14:53 +0200) Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> <87lffxlxm5.fsf@tcd.ie> <83lffvhmne.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42943 Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Robert Pluim > Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org > Date: Sat, 24 Oct 2020 14:14:53 +0200 > > Eli> I'm guessing that we close the font, but there's still a face that > Eli> references that font, and we try using that face for display. Can you > Eli> see if that is the case? The 'face' member of 'struct glyph_string' > Eli> should point to the face, and face->font should point to the font. > > Yes, weʼre using the face thatʼs cached in the glyph_string: But glyph_strings are not kept between redisplay cycles, AFAIR, they are recreated anew each time we need to redisplay something. This happens in the write_glyphs method that is called from update_window and update_frame, which eventually calls gui_write_glyphs, which calls draw_glyphs, which creates the glyph_strings in BUILD_GLYPH_STRINGS. So it's unclear to me how can a face be cached in a glyph_string. > Thread 1 "emacs" received signal SIGSEGV, Segmentation fault. > ftcrfont_glyph_extents (font=0x555556930478, glyph=1036, > metrics=metrics@entry=0x0) at ftcrfont.c:81 > 81 if (METRICS_STATUS (cache) == METRICS_INVALID) > (gdb) up > #1 0x00005555558453a1 in ftcrfont_draw (s=0x7fffffffb440, > from=, to=, x=17, y=, > with_background=) at ftcrfont.c:520 > 520 x += (s->padding_p ? 1 : ftcrfont_glyph_extents (s->font, > (gdb) l 500 > 495 struct face *face = s->face; > 496 struct font_info *ftcrfont_info = (struct font_info *) s->font; > 497 cairo_t *cr; > 498 cairo_glyph_t *glyphs; > 499 int len = to - from; > 500 int i; > 501 > 502 block_input (); > 503 > 504 cr = x_begin_cr_clip (f, s->gc); > (gdb) p s->face > $1 = (struct face *) 0x555556113290 > (gdb) p s->face->font > $2 = (struct font *) 0x555556930478 > (gdb) p s->font > $3 = (struct font *) 0x555556930478 And how do you see from the above that it's a pointer to the same 'struct font' that was used by the now-deleted first client frame? > Eli> We call font_clear_cache when a frame is deleted, so it's unclear to > Eli> me how come the font is still remembered somewhere. > > font_clear_cache closes all the fonts and sets the frame's font cache > to Qnil, I donʼt see it doing anything with faces. Faces are cached in the frame's face cache, see xfaces.c. When a frame is deleted, its face cache is freed, so its faces should also go away. A new frame starts with an empty face cache, and then faces are added to that cache as they are "realized", starting from the "basic faces" that are always needed, see realize_basic_faces. For a non-ASCII character, we produce a new face based on the default face, the first time we need to display a character that needs a font we don't already have; then that face is also added to the frame's face cache. > Eli> And I lack some background here: what is/are the character(s) we try > Eli> displaying here, and how that display is triggered by creating a new > Eli> frame due to the second emacsclient invocation? > > Itʼs just emacsclient redisplaying *scratch*, I think. And *scratch* has an Arabic character? How did that happen? I thought the recipe was only to turn on the Arabic input method. Is the offending character the IM indicator on the mode-line, per chance? > Are you saying redisplay should not be called here? No, of course not. When a new frame is created, it is immediately displayed. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 09:27:56 2020 Received: (at 42943) by debbugs.gnu.org; 24 Oct 2020 13:27:56 +0000 Received: from localhost ([127.0.0.1]:32961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWJaK-0007Jk-Um for submit@debbugs.gnu.org; Sat, 24 Oct 2020 09:27:56 -0400 Received: from mail-wm1-f47.google.com ([209.85.128.47]:37728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWJaF-0007JR-CY for 42943@debbugs.gnu.org; Sat, 24 Oct 2020 09:27:51 -0400 Received: by mail-wm1-f47.google.com with SMTP id c16so5723295wmd.2 for <42943@debbugs.gnu.org>; Sat, 24 Oct 2020 06:27:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=SqTkDGQY6X1q4p2c74Zy4qe8KiHbNkxcShn72X3Eu/k=; b=SZYFwP+d2LPJFDBpi/Tb/CVIXc4F4W5bdo295Mil/yO+AuIfiM6usmFcYZktLUAn3I uMw6Qg/X1laQL7ayUHADDT8y7LSgsOdEajBDxSynpQOwqm+/xeUMAIpMitm0imYUUmrw 8oY9k1zruAIoFGuDd3s5x3FVtD1E3rJwYVH+AN5/6mtrpuizY3ZLZHyoxwyAIaSHpuZN o3G8AeWc+sYdbv5X05T14jyMQbr+IkopOmu9gk2IjiQ4RFXELKyypEaFXONp+VL4LBDp TnyYu1GpTBwyK/auJtKpvYmVeg771HfEeru4xw6FQu2j2ZNvE8BsUufKtaXZs63J84A0 gJMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=SqTkDGQY6X1q4p2c74Zy4qe8KiHbNkxcShn72X3Eu/k=; b=kyp7azPavvuT8FaTi341iWSA+1G71oAzXZLz8/RuXCGuVY0o38aUk2iT1RpaxQiGtK LZVjxJsmZ4W8FhF7iaxBF3Rs9Aya3u9Krn9fLD1b36yXRNvN9Y1N0fKwTe9VDZaGiU6d ElR7KkSp1hvrWG//9Rwrx4nVlQRX8/KJQH3KMRjbuQ2lxVkopH2tFahIoC5cb+ZYPKrY Eut0OAzwqkahgTjbRbL25FY37xJvhTz4ySF/8S8uGIFmE3pJQgjxDttMuXz54nj+8+pq MbZgfJ/vbCnnj9E4qoamw0OxuwLJ5BTJsa6jVlhW6yONrkbDjiPvhf5eIL9W0w95BRPu qerw== X-Gm-Message-State: AOAM530vo7TATfx9+H1ojeJQJPK2w+bEiurDbWP7YZN1rRRwu+yffWQx 9dNNjt8/yCyJV/n6CzPiEcMcv6DQL08= X-Google-Smtp-Source: ABdhPJydMx3vDZDS+I+fezCWNtazMOAnVBJXK/vi5svPEFm5c0NufS+MfkFHJKBm8LX2YvV8PZMBWw== X-Received: by 2002:a1c:68c1:: with SMTP id d184mr6851356wmc.74.1603546060993; Sat, 24 Oct 2020 06:27:40 -0700 (PDT) Received: from rpluim-mac ([2a01:e34:ecfc:a860:8d6e:d31:eb45:4a86]) by smtp.gmail.com with ESMTPSA id a2sm10450538wrs.55.2020.10.24.06.27.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Oct 2020 06:27:40 -0700 (PDT) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> <87lffxlxm5.fsf@tcd.ie> <83lffvhmne.fsf@gnu.org> Date: Sat, 24 Oct 2020 15:27:39 +0200 In-Reply-To: (Robert Pluim's message of "Sat, 24 Oct 2020 14:14:53 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42943 Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Sat, 24 Oct 2020 14:14:53 +0200, Robert Pluim s= aid: Eli> I'm guessing that we close the font, but there's still a face that Eli> references that font, and we try using that face for display. Can= you Eli> see if that is the case? The 'face' member of 'struct glyph_strin= g' Eli> should point to the face, and face->font should point to the font. Robert> Yes, we=CA=BCre using the face that=CA=BCs cached in the glyph_= string: Robert> Thread 1 "emacs" received signal SIGSEGV, Segmentation fault. Robert> ftcrfont_glyph_extents (font=3D0x555556930478, glyph=3D1036, Robert> metrics=3Dmetrics@entry=3D0x0) at ftcrfont.c:81 Robert> 81 if (METRICS_STATUS (cache) =3D=3D METRICS_INVALID) Robert> (gdb) up Robert> #1 0x00005555558453a1 in ftcrfont_draw (s=3D0x7fffffffb440, Robert> from=3D, to=3D, x=3D17, y=3D<= optimized out>, Robert> with_background=3D) at ftcrfont.c:520 Robert> 520 x +=3D (s->padding_p ? 1 : ftcrfont_glyph_extents= (s->font, Robert> (gdb) l 500 Robert> 495 struct face *face =3D s->face; Robert> 496 struct font_info *ftcrfont_info =3D (struct font_info= *) s->font; Robert> 497 cairo_t *cr; Robert> 498 cairo_glyph_t *glyphs; Robert> 499 int len =3D to - from; Robert> 500 int i; Robert> 501 Robert> 502 block_input (); Robert> 503 Robert> 504 cr =3D x_begin_cr_clip (f, s->gc); Robert> (gdb) p s->face Robert> $1 =3D (struct face *) 0x555556113290 Robert> (gdb) p s->face->font Robert> $2 =3D (struct font *) 0x555556930478 Robert> (gdb) p s->font Robert> $3 =3D (struct font *) 0x555556930478 And that font comes from here: static int fill_gstring_glyph_string (struct glyph_string *s, int face_id, int start, int end, int overlaps) { struct glyph *glyph, *last; Lisp_Object lgstring; int i; bool glyph_not_available_p; s->for_overlaps =3D overlaps; glyph =3D s->row->glyphs[s->area] + start; last =3D s->row->glyphs[s->area] + end; glyph_not_available_p =3D glyph->glyph_not_available_p; s->cmp_id =3D glyph->u.cmp.id; s->cmp_from =3D glyph->slice.cmp.from; s->cmp_to =3D glyph->slice.cmp.to + 1; s->face =3D FACE_FROM_ID (s->f, face_id); lgstring =3D composition_gstring_from_id (s->cmp_id); s->font =3D XFONT_OBJECT (LGSTRING_FONT (lgstring)); <---- so it=CA=BCs the caching in the Lisp_Object for the composition that=CA=BCs causing the problem. I can also get it to crash by entering 'a' followed by U+306 (COMBINING BREVE), but the initial code path is different, as then the initial caching of the font is here: Lisp_Object hbfont_shape (Lisp_Object lgstring, Lisp_Object direction) { struct font *font =3D CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring)); (but the final crash is at the same place). Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 09:35:54 2020 Received: (at 42943) by debbugs.gnu.org; 24 Oct 2020 13:35:54 +0000 Received: from localhost ([127.0.0.1]:32966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWJi6-0007Xf-Gs for submit@debbugs.gnu.org; Sat, 24 Oct 2020 09:35:54 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:33568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWJi3-0007XL-JY for 42943@debbugs.gnu.org; Sat, 24 Oct 2020 09:35:52 -0400 Received: by mail-wr1-f43.google.com with SMTP id b8so5983251wrn.0 for <42943@debbugs.gnu.org>; Sat, 24 Oct 2020 06:35:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=XV0s+HprOM+DQhAkBEA07g6g2j2LnDAaV3jGjPx8pCg=; b=njSORD33Zg03YTaFpS3i2GdXtAsX09esF58dH3b33ey4o3AOuGAoubgjy17u4nPPTh 4TtdG1fjQ9Ii2/b9yT2b/jYyO5eCraSfGOcs60JWaZh4FHLLlgNhPChGwZ13DPoW5Z+C iSdOECLSI16j0A61+mv0g5ATW9rAEw/YFo80YSrmHEkuute5fbdj9+RLJJfinT4e58IG 5RKHpRfzvQv5M+Dq+dlnDLM5oodrfONRdh9zBG1C0QwtlxSEOf5N0mBWZdXp9WoWYMJV 0wsOzIGljQtM0xeAp4kbAa8lzndJ3ZxCFuoMgFwCxuwP+8UzPaTsiNSWXYxA2pqTS66I JzuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=XV0s+HprOM+DQhAkBEA07g6g2j2LnDAaV3jGjPx8pCg=; b=mU/6LvwJdFbTbuDGjsKNse6Xz4uzvFMLtBZI9QXcJP0O1F14BCdw+rjspIXD2gS9R2 lL7dlBEoicAy6NafWsvgCfFO/wLTbm7kr0B945sTC/ZHB+Z3TFQ3meEmopCmA1HnOm8N 0ZHFnDIWAK4KOfdqK0eAzrbH/EvxoAqQ8ve2y5NSehzH/1RJk8OJTP1CAdvurh+iqyYH DH9aiDl2vJIxrOJde0KUtWogAj7qy7z6z1ecTxTnc2ryUxBo2BkxAX/6llw5aAXzzELF WUtW8RBNO7g5s/KEeWAx6WO/8K4ADLXHgPcSUCcLp6u6F6D53x0lBw09s5DXQ/09y1Q2 +oQA== X-Gm-Message-State: AOAM531SERrBxo1XJh/8nwSP1dAatk2LhyFgfXFBNjDeIgcXIw+3Er3m ADSQUn0MiGA29DxyzEdOVdQJ2fqpPJc= X-Google-Smtp-Source: ABdhPJww2hR7ANN6b/dlMfEV6g1/3OpYps0Ih++T1B7YySKy232MntFQzyM+et58cprBNA4GH0EC/A== X-Received: by 2002:adf:fa0e:: with SMTP id m14mr7315349wrr.134.1603546545414; Sat, 24 Oct 2020 06:35:45 -0700 (PDT) Received: from rpluim-mac ([2a01:e34:ecfc:a860:8d6e:d31:eb45:4a86]) by smtp.gmail.com with ESMTPSA id u15sm10986375wrm.77.2020.10.24.06.35.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Oct 2020 06:35:44 -0700 (PDT) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> <87lffxlxm5.fsf@tcd.ie> <83lffvhmne.fsf@gnu.org> <83imazhirc.fsf@gnu.org> Date: Sat, 24 Oct 2020 15:35:43 +0200 In-Reply-To: <83imazhirc.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 24 Oct 2020 16:10:31 +0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42943 Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Sat, 24 Oct 2020 16:10:31 +0300, Eli Zaretskii said: >> From: Robert Pluim >> Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org >> Date: Sat, 24 Oct 2020 14:14:53 +0200 >>=20 Eli> I'm guessing that we close the font, but there's still a face that Eli> references that font, and we try using that face for display. Can= you Eli> see if that is the case? The 'face' member of 'struct glyph_strin= g' Eli> should point to the face, and face->font should point to the font. >>=20 >> Yes, we=CA=BCre using the face that=CA=BCs cached in the glyph_strin= g: Eli> But glyph_strings are not kept between redisplay cycles, AFAIR, th= ey Eli> are recreated anew each time we need to redisplay something. This Eli> happens in the write_glyphs method that is called from update_wind= ow Eli> and update_frame, which eventually calls gui_write_glyphs, which c= alls Eli> draw_glyphs, which creates the glyph_strings in BUILD_GLYPH_STRING= S. Eli> So it's unclear to me how can a face be cached in a glyph_string. You=CA=BCre right, it=CA=BCs not cached in the glyph_string, it=CA=BCs cach= ed in the composition_gstring that=CA=BCs used to create the glyph_string (see my other message). Eli> And how do you see from the above that it's a pointer to the same Eli> 'struct font' that was used by the now-deleted first client frame? that=CA=BCs what the valgrind trace earlier said. Eli> We call font_clear_cache when a frame is deleted, so it's unclear = to Eli> me how come the font is still remembered somewhere. >>=20 >> font_clear_cache closes all the fonts and sets the frame's font cache >> to Qnil, I don=CA=BCt see it doing anything with faces. Eli> Faces are cached in the frame's face cache, see xfaces.c. When a Eli> frame is deleted, its face cache is freed, so its faces should als= o go Eli> away. A new frame starts with an empty face cache, and then faces= are Eli> added to that cache as they are "realized", starting from the "bas= ic Eli> faces" that are always needed, see realize_basic_faces. For a Eli> non-ASCII character, we produce a new face based on the default fa= ce, Eli> the first time we need to display a character that needs a font we Eli> don't already have; then that face is also added to the frame's fa= ce Eli> cache. Eli> And I lack some background here: what is/are the character(s) we t= ry Eli> displaying here, and how that display is triggered by creating a n= ew Eli> frame due to the second emacsclient invocation? >>=20 >> It=CA=BCs just emacsclient redisplaying *scratch*, I think. Eli> And *scratch* has an Arabic character? How did that happen? I tho= ught Eli> the recipe was only to turn on the Arabic input method. Is the Eli> offending character the IM indicator on the mode-line, per chance? Yes, I suspect so, since there are no Arabic characters in *scratch* Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 10:12:26 2020 Received: (at 42943) by debbugs.gnu.org; 24 Oct 2020 14:12:26 +0000 Received: from localhost ([127.0.0.1]:34227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWKHR-0000J9-Vl for submit@debbugs.gnu.org; Sat, 24 Oct 2020 10:12:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWKHQ-0000Iw-8t for 42943@debbugs.gnu.org; Sat, 24 Oct 2020 10:12:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47118) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWKHK-0002JO-6M; Sat, 24 Oct 2020 10:12:18 -0400 Received: from [176.228.60.248] (port=4098 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kWKHJ-0007Mk-BV; Sat, 24 Oct 2020 10:12:17 -0400 Date: Sat, 24 Oct 2020 17:12:04 +0300 Message-Id: <83h7qjhfwr.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-Reply-To: (message from Robert Pluim on Sat, 24 Oct 2020 15:27:39 +0200) Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> <87lffxlxm5.fsf@tcd.ie> <83lffvhmne.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42943 Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Robert Pluim > Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org > Date: Sat, 24 Oct 2020 15:27:39 +0200 > > static int > fill_gstring_glyph_string (struct glyph_string *s, int face_id, > int start, int end, int overlaps) > { > struct glyph *glyph, *last; > Lisp_Object lgstring; > int i; > bool glyph_not_available_p; > > s->for_overlaps = overlaps; > glyph = s->row->glyphs[s->area] + start; > last = s->row->glyphs[s->area] + end; > glyph_not_available_p = glyph->glyph_not_available_p; > s->cmp_id = glyph->u.cmp.id; > s->cmp_from = glyph->slice.cmp.from; > s->cmp_to = glyph->slice.cmp.to + 1; > s->face = FACE_FROM_ID (s->f, face_id); > lgstring = composition_gstring_from_id (s->cmp_id); > s->font = XFONT_OBJECT (LGSTRING_FONT (lgstring)); <---- > > so itʼs the caching in the Lisp_Object for the composition thatʼs > causing the problem. OK, so when we are about to release a font, we need to go over all the LGSTRING objects in gstring_hash_table, and remove from that cache every LGSTRING whose LGSTRING_FONT object holds the font we are about to release. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 10:48:50 2020 Received: (at 42943) by debbugs.gnu.org; 24 Oct 2020 14:48:50 +0000 Received: from localhost ([127.0.0.1]:34249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWKqf-0001Cb-Rg for submit@debbugs.gnu.org; Sat, 24 Oct 2020 10:48:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWKqb-0001CJ-Dr for 42943@debbugs.gnu.org; Sat, 24 Oct 2020 10:48:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47612) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWKqV-0006N5-3e; Sat, 24 Oct 2020 10:48:39 -0400 Received: from [176.228.60.248] (port=2333 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kWKqU-0004a6-GB; Sat, 24 Oct 2020 10:48:38 -0400 Date: Sat, 24 Oct 2020 17:48:26 +0300 Message-Id: <83d017he85.fsf@gnu.org> From: Eli Zaretskii To: rpluim@gmail.com In-Reply-To: <83h7qjhfwr.fsf@gnu.org> (message from Eli Zaretskii on Sat, 24 Oct 2020 17:12:04 +0300) Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> <87lffxlxm5.fsf@tcd.ie> <83lffvhmne.fsf@gnu.org> <83h7qjhfwr.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42943 Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sat, 24 Oct 2020 17:12:04 +0300 > From: Eli Zaretskii > Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org > > > s->font = XFONT_OBJECT (LGSTRING_FONT (lgstring)); <---- > > > > so itʼs the caching in the Lisp_Object for the composition thatʼs > > causing the problem. > > OK, so when we are about to release a font, we need to go over all the > LGSTRING objects in gstring_hash_table, and remove from that cache > every LGSTRING whose LGSTRING_FONT object holds the font we are about > to release. Here, does the below give good results? diff --git a/src/composite.c b/src/composite.c index 984e0d9..f1b4b97 100644 --- a/src/composite.c +++ b/src/composite.c @@ -679,6 +679,27 @@ composition_gstring_from_id (ptrdiff_t id) return HASH_VALUE (h, id); } +/* Remove from the composition hash table every lgstring that + references the given FONT_OBJECT. */ +void +composition_gstring_cache_clear_font (Lisp_Object font_object) +{ + struct Lisp_Hash_Table *h = XHASH_TABLE (gstring_hash_table); + + for (ptrdiff_t i = 0; i < HASH_TABLE_SIZE (h); ++i) + { + Lisp_Object k = HASH_KEY (h, i); + + if (!EQ (k, Qunbound)) + { + Lisp_Object gstring = HASH_VALUE (h, i); + + if (EQ (LGSTRING_FONT (gstring), font_object)) + hash_remove_from_table (h, k); + } + } +} + DEFUN ("clear-composition-cache", Fclear_composition_cache, Sclear_composition_cache, 0, 0, 0, doc: /* Internal use only. diff --git a/src/composite.h b/src/composite.h index 239f1e5..0d7d1c7 100644 --- a/src/composite.h +++ b/src/composite.h @@ -331,6 +331,8 @@ #define LGLYPH_WADJUST(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \ extern ptrdiff_t composition_adjust_point (ptrdiff_t, ptrdiff_t); +extern void composition_gstring_cache_clear_font (Lisp_Object); + INLINE_HEADER_END #endif /* not EMACS_COMPOSITE_H */ diff --git a/src/font.c b/src/font.c index fe257f4..d74938e 100644 --- a/src/font.c +++ b/src/font.c @@ -2645,6 +2645,11 @@ font_clear_cache (struct frame *f, Lisp_Object cache, if (! NILP (AREF (val, FONT_TYPE_INDEX))) { eassert (font && driver == font->driver); + /* We are going to close the font, so make + sure we don't have any lgstrings lying + around in lgstring cache that reference + the font. */ + composition_gstring_cache_clear_font (val); driver->close_font (font); } } From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 11:35:00 2020 Received: (at 42943) by debbugs.gnu.org; 24 Oct 2020 15:35:00 +0000 Received: from localhost ([127.0.0.1]:34315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWLZM-0002LY-0z for submit@debbugs.gnu.org; Sat, 24 Oct 2020 11:35:00 -0400 Received: from mail-wm1-f50.google.com ([209.85.128.50]:36510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWLZH-0002L6-Qe for 42943@debbugs.gnu.org; Sat, 24 Oct 2020 11:34:57 -0400 Received: by mail-wm1-f50.google.com with SMTP id e2so6100660wme.1 for <42943@debbugs.gnu.org>; Sat, 24 Oct 2020 08:34:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=uxH2fdQOvSnkTe4yAcUljY209VmnFkVS/5tQ10pP+eY=; b=i6eS8OMpBctAduxx59dm2Mg5v+e7opS0qCwk8KXbxF4KJCZ8+Kh16n43M6oRMblc0D o6q97UpQyPmB22tgwV5ioKCwncEPIxuYbksSYLiuDn1R/yoPWEjhGTZxulXNzzh5BfZ4 F+Kh8Ln3kqIPp7SbYBDXa4NegzYQond294lyTTFpjnKtCAjUOVxhBuSDSbB80wuMGwdH LeKdE1vp90RODrHpx0/mNhw9FdyiC7Oi8vE3ERGrydYuqxRJx/RW3nBn2hCDn+ClooDm Bm+AEHZgeRdidqibUqvCcwooEmWIVHb33WwN8ZASsP/QkwpybhT6UQS2ABa5Udb9vTov WnTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=uxH2fdQOvSnkTe4yAcUljY209VmnFkVS/5tQ10pP+eY=; b=b0sE02IaIVjpum4cTHMfrVkruswVzn9bDE9SQ+rOhfF/P1wqoVFF37Hb4c5h1Gsb5U 8S+cLKZ5uX7VHVPuCWsN7HEKAzTnmu4rrQLmFo80OMhxrTmBFN7ACI0q1TG5MmP+cRLX OQQ2vGgsMz1Wxi2eOfPBwdsWlymPPCngHxZX4LSmRQkgydAZUI26iURuzgjR7AbEY5ka s9QPmSGLknJPCkKhR8o7iwDUSfD8izXrXsX4+vUScar+ewbvCY5jiTE8B4N1/jx8sZSU V9nQkLFTEptXjsmfqv43X5VLT5yqRTAqn7L+/VC48J2kDpxkqXGDp4/Zn024XElmRhxd 3maw== X-Gm-Message-State: AOAM531pf1J/8aKlb75ojLBFlwm8iQRvVGlrlD+nvJPt3bER5LoUKVxb /YeXzoujyEhK3bqBHXG+AI6VMI/4/Os= X-Google-Smtp-Source: ABdhPJwtBV4LeEogdOmye1FN854HnfGHPOxOuOHVBUysXkumQs65rNuO/t/N0X6QTxI+4pK0zCTRUw== X-Received: by 2002:a7b:c20a:: with SMTP id x10mr6570764wmi.29.1603553689328; Sat, 24 Oct 2020 08:34:49 -0700 (PDT) Received: from rpluim-mac ([2a01:e34:ecfc:a860:8d6e:d31:eb45:4a86]) by smtp.gmail.com with ESMTPSA id a2sm11125697wrs.55.2020.10.24.08.34.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Oct 2020 08:34:48 -0700 (PDT) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> <87lffxlxm5.fsf@tcd.ie> <83lffvhmne.fsf@gnu.org> <83h7qjhfwr.fsf@gnu.org> Date: Sat, 24 Oct 2020 17:34:47 +0200 In-Reply-To: <83h7qjhfwr.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 24 Oct 2020 17:12:04 +0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42943 Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Sat, 24 Oct 2020 17:12:04 +0300, Eli Zaretskii said: >> From: Robert Pluim >> Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org >> Date: Sat, 24 Oct 2020 15:27:39 +0200 >>=20 >> static int >> fill_gstring_glyph_string (struct glyph_string *s, int face_id, >> int start, int end, int overlaps) >> { >> struct glyph *glyph, *last; >> Lisp_Object lgstring; >> int i; >> bool glyph_not_available_p; >>=20 s-> for_overlaps =3D overlaps; >> glyph =3D s->row->glyphs[s->area] + start; >> last =3D s->row->glyphs[s->area] + end; >> glyph_not_available_p =3D glyph->glyph_not_available_p; s-> cmp_id =3D glyph->u.cmp.id; s-> cmp_from =3D glyph->slice.cmp.from; s-> cmp_to =3D glyph->slice.cmp.to + 1; s-> face =3D FACE_FROM_ID (s->f, face_id); >> lgstring =3D composition_gstring_from_id (s->cmp_id); s-> font =3D XFONT_OBJECT (LGSTRING_FONT (lgstring)); <---- >>=20 >> so it=CA=BCs the caching in the Lisp_Object for the composition that= =CA=BCs >> causing the problem. Eli> OK, so when we are about to release a font, we need to go over all= the Eli> LGSTRING objects in gstring_hash_table, and remove from that cache Eli> every LGSTRING whose LGSTRING_FONT object holds the font we are ab= out Eli> to release. I stuck an Fclrhash (gstring_hash_table) in ftcrfont_close, and it no longer crashes (and valgrind is happy). The following also doesn=CA=BCt crash, but I worry about the quadratic behaviour when removing the entries from the hash_table. Do we need a hash_remove_from_table_by_index? Am I being overly paranoid? I=CA=BCve not checked with other font backends, so the same treatment might be needed there. diff --git i/src/composite.c w/src/composite.c index 984e0d9cda..93a700897f 100644 --- i/src/composite.c +++ w/src/composite.c @@ -639,6 +639,18 @@ compose_text (ptrdiff_t start, ptrdiff_t end, Lisp_Obj= ect components, =20 static Lisp_Object gstring_lookup_cache (Lisp_Object); =20 +void +gstring_remove_from_cache_by_font (struct font * font) +{ + struct Lisp_Hash_Table *h =3D XHASH_TABLE (gstring_hash_table); + for (ptrdiff_t i =3D 0; i < HASH_TABLE_SIZE (h); ++i) + { + Lisp_Object k =3D HASH_KEY (h, i); + if (!EQ (k, Qunbound) && font =3D=3D XFONT_OBJECT (LGSTRING_FONT (HA= SH_VALUE (h, i)))) + hash_remove_from_table (h, k); + } +} + static Lisp_Object gstring_lookup_cache (Lisp_Object header) { diff --git i/src/composite.h w/src/composite.h index 239f1e531e..2c30ee1933 100644 --- i/src/composite.h +++ w/src/composite.h @@ -331,6 +331,8 @@ #define LGLYPH_WADJUST(g) (VECTORP (LGLYPH_ADJUSTMENT (= g)) \ =20 extern ptrdiff_t composition_adjust_point (ptrdiff_t, ptrdiff_t); =20 +extern void gstring_remove_from_cache_by_font (struct font *); + INLINE_HEADER_END =20 #endif /* not EMACS_COMPOSITE_H */ diff --git i/src/ftcrfont.c w/src/ftcrfont.c index 4892a34a3a..61a2b1290f 100644 --- i/src/ftcrfont.c +++ w/src/ftcrfont.c @@ -283,6 +283,7 @@ ftcrfont_close (struct font *font) struct font_info *ftcrfont_info =3D (struct font_info *) font; =20 block_input (); + gstring_remove_from_cache_by_font (font); #ifdef HAVE_LIBOTF if (ftcrfont_info->otf) { Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 11:41:46 2020 Received: (at 42943) by debbugs.gnu.org; 24 Oct 2020 15:41:46 +0000 Received: from localhost ([127.0.0.1]:34350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWLfu-0002Wz-CC for submit@debbugs.gnu.org; Sat, 24 Oct 2020 11:41:46 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]:51179) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWLfs-0002Wm-Ap for 42943@debbugs.gnu.org; Sat, 24 Oct 2020 11:41:44 -0400 Received: by mail-wm1-f44.google.com with SMTP id 13so5569470wmf.0 for <42943@debbugs.gnu.org>; Sat, 24 Oct 2020 08:41:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=IUP9GDbbWpeTyCaqDcg1wvkHIQC2NbDztAN9FNwzOgU=; b=jTwrUWxH4ocoXDNr/QOYlMeklejSy3UD37d6ers4bivJHMKZzdxfzRobn551VC3PWH NsQqIK2dUJwsHXmsVDpc24/CBc4SSTUPH2JwduOEGmh2q8JMO5sBNZESTYmhXOunzIak XAhqYFuLWizav+wevtHZCuho6xIB7Qk0ymi30Pja+9yEH+m7t1nF5GQrTXr9fAuPX+3o BPX8A10epEd3bLFRCJM7sZ9RZ/zK2U85t68P4oAvnoJnuWeJBXcCaP/4WSzanirUnzV3 JIpiqM883klYqFzapRJgx8WKvRhZ56p0DojU5liIzmtZ32awKzphqGamcqPvqdux2+EB iyHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=IUP9GDbbWpeTyCaqDcg1wvkHIQC2NbDztAN9FNwzOgU=; b=P9IYLrfVuV2ffwu5kA93sxkS95fD9A5obhJTAmANPlWckC+UPuD4fz6yICCYNR9ww9 07M1vosHPl3bdVtQVyasi9+0DUReipoMq7CPs1Ax5lBh6kgIVxoOcehvK8oYCLhrT+wH P64ECpuXn3vfbN5HnW7rYyCzmSqacFlttpc3R9GHz2DM6dmOctGr5Fx9PvjkwTP0PD+B NrFl7GXznOxuR2o6cbtURkgO7Nc8Hrn/kJRLGV01TqdBwb4ND2wuCzL0gMzH9H1KmhNy Nq/JbxWisXN72zJuAgGDak4eTOnR0PqHzhBu1ACAMPqxy3Bf7EFK+Ylm3oTJQE1mC6SE Fxtw== X-Gm-Message-State: AOAM531c7pEWx3mP4xd6y68/QU3zDtGqx4TvIGnJaPuFLjiOpEuowi5s kWLDXfhmcf2GgkMaFenniOgh9SRIn+g= X-Google-Smtp-Source: ABdhPJykQUCMH8B/PGKrXxyb0qG97rGVEGfp8dHq7QbqprfVN0sfbyZ3aLim5VRg/c7WkdzP3t2F9g== X-Received: by 2002:a7b:cb10:: with SMTP id u16mr7536440wmj.20.1603554098135; Sat, 24 Oct 2020 08:41:38 -0700 (PDT) Received: from rpluim-mac ([2a01:e34:ecfc:a860:8d6e:d31:eb45:4a86]) by smtp.gmail.com with ESMTPSA id k6sm11113892wmk.16.2020.10.24.08.41.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Oct 2020 08:41:37 -0700 (PDT) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> <87lffxlxm5.fsf@tcd.ie> <83lffvhmne.fsf@gnu.org> <83h7qjhfwr.fsf@gnu.org> <83d017he85.fsf@gnu.org> Date: Sat, 24 Oct 2020 17:41:36 +0200 In-Reply-To: <83d017he85.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 24 Oct 2020 17:48:26 +0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42943 Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Sat, 24 Oct 2020 17:48:26 +0300, Eli Zaretskii said: >> Date: Sat, 24 Oct 2020 17:12:04 +0300 >> From: Eli Zaretskii >> Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org >>=20 >> > s->font =3D XFONT_OBJECT (LGSTRING_FONT (lgstring)); <---- >> >=20 >> > so it=CA=BCs the caching in the Lisp_Object for the composition th= at=CA=BCs >> > causing the problem. >>=20 >> OK, so when we are about to release a font, we need to go over all t= he >> LGSTRING objects in gstring_hash_table, and remove from that cache >> every LGSTRING whose LGSTRING_FONT object holds the font we are about >> to release. Eli> Here, does the below give good results? I should really hit 'g' in Gnus before writing patches :-) That fixes it as well. Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 11:53:12 2020 Received: (at 42943) by debbugs.gnu.org; 24 Oct 2020 15:53:12 +0000 Received: from localhost ([127.0.0.1]:34376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWLqx-0002or-N5 for submit@debbugs.gnu.org; Sat, 24 Oct 2020 11:53:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWLqt-0002oa-JX for 42943@debbugs.gnu.org; Sat, 24 Oct 2020 11:53:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48780) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWLqn-0005Bl-Av; Sat, 24 Oct 2020 11:53:01 -0400 Received: from [176.228.60.248] (port=2871 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kWLqm-0005vZ-Ni; Sat, 24 Oct 2020 11:53:01 -0400 Date: Sat, 24 Oct 2020 18:52:48 +0300 Message-Id: <83a6wbhb8v.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-Reply-To: (message from Robert Pluim on Sat, 24 Oct 2020 17:41:36 +0200) Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> <87lffxlxm5.fsf@tcd.ie> <83lffvhmne.fsf@gnu.org> <83h7qjhfwr.fsf@gnu.org> <83d017he85.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42943 Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Robert Pluim > Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org > Date: Sat, 24 Oct 2020 17:41:36 +0200 > > >> OK, so when we are about to release a font, we need to go over all the > >> LGSTRING objects in gstring_hash_table, and remove from that cache > >> every LGSTRING whose LGSTRING_FONT object holds the font we are about > >> to release. > > Eli> Here, does the below give good results? > > I should really hit 'g' in Gnus before writing patches :-) > > That fixes it as well. OK, thanks. (I think clearing the entire cache of gstrings is too radical: we don't necessarily remove all the fonts from all the frames.) Now the important question: should we install this on master or on the release branch? I believe the problem is not limited to 28.0.50, is it? OTOH, is this safe enough to install on emacs-27? From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 26 08:34:01 2020 Received: (at 42943) by debbugs.gnu.org; 26 Oct 2020 12:34:01 +0000 Received: from localhost ([127.0.0.1]:38773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX1hJ-0007EI-93 for submit@debbugs.gnu.org; Mon, 26 Oct 2020 08:34:01 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:43349) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX1hH-0007E6-Fx for 42943@debbugs.gnu.org; Mon, 26 Oct 2020 08:33:59 -0400 Received: by mail-wr1-f67.google.com with SMTP id g12so12273911wrp.10 for <42943@debbugs.gnu.org>; Mon, 26 Oct 2020 05:33:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version; bh=TWokKb75OxdOcLhxE1G6yAttKxwufO7CLA3a6PjKoqA=; b=Cj4I9ilhGB7HSYWZXGCiTbYzTGdglCgAGX9LmvgJQgMbz/6eDN/uunwOreuF7Y918I dNbwn0PsaDPR9VL4m17Zo3067waO3NcjdnITrwRPIaljqImZdH9F+9jaqIHoywsqlYOm vJERh3y1btt/ZUr86Ri+gevtuCqm2fjdseslwQkf4K+ZyNjx/ZRuQyI3C6fLZO764ekP 3hc5018uSFBW5iG72jE2ow59v+AJ1FxIfuymHXCYSSDrvbj7E7XiMs3w2D1+6+3tewFp e4Rds8xcf/5ORnMEia9MQraohmz5dL6HIQodryQ2bKC/4PuLrj8ARWNGx/Kyw+w6I6co s1GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version; bh=TWokKb75OxdOcLhxE1G6yAttKxwufO7CLA3a6PjKoqA=; b=s1NKwjXMX3Hcj6juClxBKnFxIiOslaFMDhP+AK+bDYDbCxJHYtYC4FCgePbPr9pnhN tzsYUUNy5JcPjlxkWngU7S1Sjcy5WQxYmB1KM+daFPi7ad2XFlXgLOHHxNNx+blWq1xj RrX3NR4KSexUW4PuxErY766GxZWrg4Hkemy7sGUcQC0MjOjKkzfumRgEDUIYVsX+eZPu 9JogOW9456Kbsq1BAl7ZSNSwMx2iZPk0n92PTk6H6fMF3roasKbQdw6tfCYKZIP8zVjy FpC0sIuTr8U0WVU9DfzHgaO23hhAYdszKNrhXvQw7x5DD1xhWQ+VxGgt/amHgtync+Ed ZmtA== X-Gm-Message-State: AOAM532YqoK9TBmFiITGEuxlSe4Yqhe0e7P3tDcN2It06+DC+Dss/O5v zzjWr3HtM0h+/KRR03GVriaUa2I5lJI= X-Google-Smtp-Source: ABdhPJzbk+EfEY1nP40roCzbB2SWlOF1j0jdNS9vKA2oHzgIpEOSmZFnDY18gXt2x+nf4BjO5SjmSA== X-Received: by 2002:adf:ff86:: with SMTP id j6mr17350616wrr.184.1603715632023; Mon, 26 Oct 2020 05:33:52 -0700 (PDT) Received: from rltb ([2a01:e34:ecfc:a860:b8a7:b0cb:e6ee:f110]) by smtp.gmail.com with ESMTPSA id z4sm22398299wrg.53.2020.10.26.05.33.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 05:33:50 -0700 (PDT) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> <87lffxlxm5.fsf@tcd.ie> <83lffvhmne.fsf@gnu.org> <83h7qjhfwr.fsf@gnu.org> <83d017he85.fsf@gnu.org> <83a6wbhb8v.fsf@gnu.org> Date: Mon, 26 Oct 2020 13:33:49 +0100 In-Reply-To: <83a6wbhb8v.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 24 Oct 2020 18:52:48 +0300") Message-ID: <878sbt6uaa.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42943 Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Robert Pluim >> Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org >> Date: Sat, 24 Oct 2020 17:41:36 +0200 >> >> >> OK, so when we are about to release a font, we need to go over all the >> >> LGSTRING objects in gstring_hash_table, and remove from that cache >> >> every LGSTRING whose LGSTRING_FONT object holds the font we are about >> >> to release. >> >> Eli> Here, does the below give good results? >> >> I should really hit 'g' in Gnus before writing patches :-) >> >> That fixes it as well. > > OK, thanks. (I think clearing the entire cache of gstrings is too > radical: we don't necessarily remove all the fonts from all the > frames.) > Right > Now the important question: should we install this on master or on the > release branch? I believe the problem is not limited to 28.0.50, is > it? OTOH, is this safe enough to install on emacs-27? I can't reproduce this crash on emacs-27 built with Cairo + Harfbuzz at all. Robert -- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 26 12:17:24 2020 Received: (at 42943) by debbugs.gnu.org; 26 Oct 2020 16:17:24 +0000 Received: from localhost ([127.0.0.1]:40999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX5BU-0002vY-HL for submit@debbugs.gnu.org; Mon, 26 Oct 2020 12:17:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX5BJ-0002v9-Bk for 42943@debbugs.gnu.org; Mon, 26 Oct 2020 12:17:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57771) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX5BD-00086g-N2; Mon, 26 Oct 2020 12:17:07 -0400 Received: from [176.228.60.248] (port=1157 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kX5BB-0006fF-Nq; Mon, 26 Oct 2020 12:17:06 -0400 Date: Mon, 26 Oct 2020 18:16:58 +0200 Message-Id: <838sbtezd1.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-Reply-To: <878sbt6uaa.fsf@gmail.com> (message from Robert Pluim on Mon, 26 Oct 2020 13:33:49 +0100) Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> <87lffxlxm5.fsf@tcd.ie> <83lffvhmne.fsf@gnu.org> <83h7qjhfwr.fsf@gnu.org> <83d017he85.fsf@gnu.org> <83a6wbhb8v.fsf@gnu.org> <878sbt6uaa.fsf@gmail.com> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42943 Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Robert Pluim > Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org > Date: Mon, 26 Oct 2020 13:33:49 +0100 > > > Now the important question: should we install this on master or on the > > release branch? I believe the problem is not limited to 28.0.50, is > > it? OTOH, is this safe enough to install on emacs-27? > > I can't reproduce this crash on emacs-27 built with Cairo + Harfbuzz > at all. I'm a bit surprised. But okay, let's install on master and wait for reports about similar problems on emacs-27. Pushed. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 26 16:13:47 2020 Received: (at control) by debbugs.gnu.org; 26 Oct 2020 20:13:47 +0000 Received: from localhost ([127.0.0.1]:41510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX8sF-0000Zz-BF for submit@debbugs.gnu.org; Mon, 26 Oct 2020 16:13:47 -0400 Received: from mail-wm1-f45.google.com ([209.85.128.45]:38308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX8sE-0000Zg-1m for control@debbugs.gnu.org; Mon, 26 Oct 2020 16:13:46 -0400 Received: by mail-wm1-f45.google.com with SMTP id l15so13788081wmi.3 for ; Mon, 26 Oct 2020 13:13:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Mff3O++0YcQtltJ90r8tb9aCbhOFVYPZrDdiY3SIeps=; b=T3vrNik1nSB34K2fwan6LiWGuGpRggqumQy03nok7u8I/eQVBzeBJuBnCwQC4e24bP 4wDrSZGCOkV6dwKOqvQJ/AmnQ/Trv+2Yr7bGtU3TEkVK37wDkrr5OdMknVaLuY5NPuuj cg64bNWxDqLBRlUKsRSjRk6O2NWMIttihCps28GVWSLE+PqJXE/gx1XPNEwS0UyMXw1D 3JWxpKqf7lMLCniQDmaGvIMAhXCUbEo/kliXs6k4LhoYOEoowvKJR1LIylcDlSzqMP6b BORN/+7XPi0vdW4G0FFb8eQj//HdQKWuRV2Xx5u1AIopWs3wwHEMiiwD+373pyHg+4VB W4jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Mff3O++0YcQtltJ90r8tb9aCbhOFVYPZrDdiY3SIeps=; b=FmnaxEb6MotWNYR928BD2UjmTIvc+bQt+tgbU3vb1ASyuCgAfv9fj0XgQEycR+q4Pn kDlebpZ6FGiKD1R3dp08ECn2ovUC5dVFZz5Vr/i0rKFZ095Nw0ne3X0dYE0oPOJczJt/ LI5wyoDnXreAb3Ngiu0/wCHhpyTDdWmRLL97vb40GfL2nuJ0rG9ujs5rw+YHtc6D3Hvc 5KzFMJI0472nu9k2RE2pAK8QF9x9u0GY21w+ttn59IZ/Yyka2XmQ7suWe2b2FSQE88nA DWLkLXcrCVq5aMEIMGped4L/VQ/t7n6y5MSAAKMBZJt84l2xGqFkuDLsW6mWPw0jnJ1D 9rXw== X-Gm-Message-State: AOAM532J/3U6fQXUDz/KsanHU+gVV0iA4QRZ45wblIhMkwur4MQCdmgQ +K7druN78889ikaucjT64XBgwg== X-Google-Smtp-Source: ABdhPJx7rXwyxihoT4g2mLXM9hwbghIsQGdbH6ifcDuUAWR3mTltu0SfjK1QzLuckHFtXGUZSp1cSA== X-Received: by 2002:a7b:c2fa:: with SMTP id e26mr16984899wmk.37.1603743220314; Mon, 26 Oct 2020 13:13:40 -0700 (PDT) Received: from localhost ([109.78.145.8]) by smtp.gmail.com with ESMTPSA id h4sm218531wrp.52.2020.10.26.13.13.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 13:13:39 -0700 (PDT) From: "Basil L. Contovounesios" To: Eli Zaretskii Subject: Re: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> <87lffxlxm5.fsf@tcd.ie> <83lffvhmne.fsf@gnu.org> <83h7qjhfwr.fsf@gnu.org> <83d017he85.fsf@gnu.org> <83a6wbhb8v.fsf@gnu.org> <878sbt6uaa.fsf@gmail.com> <838sbtezd1.fsf@gnu.org> Date: Mon, 26 Oct 2020 20:13:38 +0000 In-Reply-To: <838sbtezd1.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 26 Oct 2020 18:16:58 +0200") Message-ID: <874kmgeoel.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: Robert Pluim , larsi@gnus.org, 42943-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 42943 fixed close 42943 28.1 quit Eli Zaretskii writes: >> From: Robert Pluim >> Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org >> Date: Mon, 26 Oct 2020 13:33:49 +0100 >> >> > Now the important question: should we install this on master or on the >> > release branch? I believe the problem is not limited to 28.0.50, is >> > it? OTOH, is this safe enough to install on emacs-27? >> >> I can't reproduce this crash on emacs-27 built with Cairo + Harfbuzz >> at all. Same here, at least with the recipe in the OP. > I'm a bit surprised. > But okay, let's install on master and wait for > reports about similar problems on emacs-27. > > Pushed. Thanks to both of you for debugging this. I can no longer reproduce the reported crash on master, so I'm closing this report. -- Basil From unknown Tue Jun 17 22:19:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 24 Nov 2020 12:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator