From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#49066: 26.3; Segmentation fault on specific utf8 string Date: Thu, 17 Jun 2021 11:13:17 +0300 Message-ID: <831r9029k2.fsf@gnu.org> References: <871r91ikdv.fsf@gnus.org> <83czsl0z4z.fsf@gnu.org> <87czsl543c.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30239"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49066@debbugs.gnu.org, larsi@gnus.org, mvsfrasson@gmail.com To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 17 10:14:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltnAA-0007Zg-Hh for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Jun 2021 10:14:10 +0200 Original-Received: from localhost ([::1]:35720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltnA9-0005tm-9T for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Jun 2021 04:14:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltnA2-0005td-8k for bug-gnu-emacs@gnu.org; Thu, 17 Jun 2021 04:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42195) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ltnA2-0005Yg-1B for bug-gnu-emacs@gnu.org; Thu, 17 Jun 2021 04:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ltnA1-0007M1-MD for bug-gnu-emacs@gnu.org; Thu, 17 Jun 2021 04:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Jun 2021 08:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49066 X-GNU-PR-Package: emacs Original-Received: via spool by 49066-submit@debbugs.gnu.org id=B49066.162391761028213 (code B ref 49066); Thu, 17 Jun 2021 08:14:01 +0000 Original-Received: (at 49066) by debbugs.gnu.org; 17 Jun 2021 08:13:30 +0000 Original-Received: from localhost ([127.0.0.1]:53741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltn9S-0007Ks-9H for submit@debbugs.gnu.org; Thu, 17 Jun 2021 04:13:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltn9M-0007KY-TC for 49066@debbugs.gnu.org; Thu, 17 Jun 2021 04:13:25 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55068) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltn9H-0004yi-74; Thu, 17 Jun 2021 04:13:15 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2768 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltn9G-0005Po-R1; Thu, 17 Jun 2021 04:13:15 -0400 In-Reply-To: <87czsl543c.fsf@gmail.com> (message from Robert Pluim on Thu, 17 Jun 2021 09:43:03 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:208657 Archived-At: > From: Robert Pluim > Cc: Lars Ingebrigtsen , 49066@debbugs.gnu.org, > mvsfrasson@gmail.com > Date: Thu, 17 Jun 2021 09:43:03 +0200 > > This is from an optimized build of emacs-26.1. I can redo it with a > '-g3 -O0' if you want. That'd help. > Thread 1 "emacs" received signal SIGSEGV, Segmentation fault. > ftfont_shape_by_flt (matrix=, otf=, ft_face=, font=, lgstring=...) > at ftfont.c:2573 > 2573 g->g.to = LGLYPH_TO (LGSTRING_GLYPH (lgstring, g->g.to)); So, is 'g' a NULL pointer or something? Or is 'lgstring' faulty in some way? IOW, what is the immediate reason for the segfault? > (gdb) bt > #0 ftfont_shape_by_fltPython Exception value has been optimized out: What's the story with these Python exceptions? Looks like some problem in our .gdbinit? > (matrix=, otf=, ft_face=, font=, lgstring=) > at ftfont.c:2573 > #1 ftfont_shapePython Exception value has been optimized out: > (lgstring=, lgstring@entry=XIL(0xaa2755)) at ftfont.c:2615 > #2 0x00000000005d97f5 in xftfont_shape (lgstring=XIL(0xaa2755)) at xftfont.c:670 > #3 0x000000000057fc2a in Ffont_shape_gstringPython Exception value has been optimized out: > (gstring=) at font.c:4427 > #4 0x000000000056fede in funcall_subr (subr=0x97fac0 , numargs=numargs@entry=1, args=args@entry=0x7fffffff59a0) > at eval.c:2844 > #5 0x000000000056ecff in Ffuncall (nargs=, args=args@entry=0x7fffffff5998) at lisp.h:600 The backtrace stops too soon. Can you show more? I'd like at the very least to see which sequence of characters causes the trouble. >From the above, I can only glean that we were performing a character composition. It could be some problem with the shaping engine: I guess versions after Emacs 26 are built with HarfBuzz, not m17n-flt? If you forcibly use m17n-flt in a later Emacs, does it still not crash? Thanks.