From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#49066: 26.3; Segmentation fault on specific utf8 string Date: Mon, 28 Jun 2021 12:56:06 +0200 Message-ID: <871r8mqmux.fsf@gmail.com> References: <87sg14kpkn.fsf@gnu.org> <83tuljq152.fsf@gnu.org> <28ac2c34-52f9-e09c-d5e1-9a4a9e454060@cs.ucla.edu> <83im1zp195.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20564"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49066@debbugs.gnu.org, handa@gnu.org, larsi@gnus.org, Paul Eggert , mvsfrasson@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 28 12:57:14 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 1lxowz-00057A-Jp for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Jun 2021 12:57:13 +0200 Original-Received: from localhost ([::1]:55194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lxowy-0000Up-3c for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Jun 2021 06:57:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxowo-0000Uh-PE for bug-gnu-emacs@gnu.org; Mon, 28 Jun 2021 06:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39573) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lxowo-0007CP-AX for bug-gnu-emacs@gnu.org; Mon, 28 Jun 2021 06:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lxowo-00016d-4T for bug-gnu-emacs@gnu.org; Mon, 28 Jun 2021 06:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Jun 2021 10:57:02 +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.16248777774193 (code B ref 49066); Mon, 28 Jun 2021 10:57:02 +0000 Original-Received: (at 49066) by debbugs.gnu.org; 28 Jun 2021 10:56:17 +0000 Original-Received: from localhost ([127.0.0.1]:51119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxow5-00015Y-0h for submit@debbugs.gnu.org; Mon, 28 Jun 2021 06:56:17 -0400 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:42565) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxow2-00015G-4B for 49066@debbugs.gnu.org; Mon, 28 Jun 2021 06:56:16 -0400 Original-Received: by mail-wr1-f46.google.com with SMTP id j1so20675019wrn.9 for <49066@debbugs.gnu.org>; Mon, 28 Jun 2021 03:56:13 -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=Ro5U1u3aJeQXPTuNAjMC84CYXyo1oEpVMFy3wHBKhLc=; b=Ofcgycqebhc8CiuPm7/QGZFPTOE5ZlrQH9oyDyQSeWI9/uQdL4BnHTH0D2BScRpHJH bHlWJkHOv+32hMT869w0E3+wJ1eLQOuNm9TfUJtDjW7zTS1OPGXH49FFUy+3oJLAF3bB +I9yhdIfQa1WAryiqITBYPFcLjp+18phryJC9FGQWZ+PMwRxTAYSCOTpqz/inuF9mLBm NSB2oEwfBZP8gKnKaTk9qN+LYF/qFDdRLrFCnKLvrPy1j8lWE8JBbDBbtH5TcO1kLLNf HIzz5PTkpwIYu0xvxU32PwWOcNRNPl44jrlKeavn/ArtIqmxuuWxUSxqpWCWa/6IRY04 ikow== 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=Ro5U1u3aJeQXPTuNAjMC84CYXyo1oEpVMFy3wHBKhLc=; b=tKpglQfy8Yo7BVtRbvV9n12RneloJ4MopiA0ZxJ3e/SNOu/AB5r2mRs728q5JrZXD1 vkBhRm1umoGpli8LY9wwriER7J7brZMv3pMR43JlQzjqOhH8qUrrt0bfyXrwz1xH+ZKr JpfMWVqBh0RbPIeh5ITF1z7GsLPGCrGjk7Dm8g2NNVk2BB3HFBsbocWLMok+UH+M/m2e mQ6mo8A4UVm4EulN7hcdFJNYmYKnyXCcqVlxn2iaaBsjnxDgjQ0w14+bWNDXBfz02mm4 28okgvFUiy+w/rGHKGRXstDZDTvo+LHOxuszLLCsbMeBpCDZrx1Z0nqGLLJcVdXptEYr vWuw== X-Gm-Message-State: AOAM5334IdcKZmacvhHhIl70+r8+FC9pyQH0dypV6axR9fn2aC6OHiD6 bW5cnvDHUHwdxgMVVFnTRtg= X-Google-Smtp-Source: ABdhPJzDr05nEuXMwQG30nSCN65Un8iGNmPQxVxJ/KKjOllm3NTrCI7An5XFQ8AVeImpZQRKd0Mw5Q== X-Received: by 2002:a5d:648e:: with SMTP id o14mr26722113wri.5.1624877768105; Mon, 28 Jun 2021 03:56:08 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id w8sm14069290wre.70.2021.06.28.03.56.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Jun 2021 03:56:07 -0700 (PDT) In-Reply-To: <83im1zp195.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 27 Jun 2021 22:15:50 +0300") 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:209051 Archived-At: >>>>> On Sun, 27 Jun 2021 22:15:50 +0300, Eli Zaretskii said: >> Cc: rpluim@gmail.com, larsi@gnus.org, 49066@debbugs.gnu.org, >> mvsfrasson@gmail.com >> From: Paul Eggert >> Date: Sun, 27 Jun 2021 11:02:26 -0700 >> >> On 6/26/21 11:20 PM, Eli Zaretskii wrote: >> > Since we are moving away of m17n-flt, I don't think we should optimize >> > memory management when m17n-flt is used, especially if that causes >> > problems. So if the patch fixes the crash, I think we should install >> > it. >> >> Sure, and I can volunteer to do that. Would you like me to do it in >> master now, or wait for confirmation and install it on the emacs-27 >> branch? or perhaps some other course of action? Eli> I'd like to see the confirmation, and then install this on master. Eli> Thanks. With the patch it still crashes for me in emacs-master with harfbuzz disabled: Thread 1 "emacs" received signal SIGSEGV, Segmentation fault. 0x000055555576d4e7 in AREF (array=XIL(0), idx=1) at lisp.h:1838 1838 return XVECTOR (array)->contents[idx]; (gdb) bt #0 0x000055555576d4e7 in AREF (array=XIL(0), idx=1) at lisp.h:1838 #1 0x0000555555774be0 in ftfont_shape_by_flt (lgstring=XIL(0x7ffff1e5301d), font=0x55555604f410, ft_face=0x5555566a2400, otf=0x555556696b60, matrix=0x55555604f508) at ftfont.c:2852 #2 0x0000555555775002 in ftfont_shape (lgstring=XIL(0x7ffff1e5301d), direction=XIL(0)) at ftfont.c:2890 #3 0x000055555577629e in ftcrfont_shape (lgstring=XIL(0x7ffff1e5301d), direction=XIL(0)) at ftcrfont.c:477 #4 0x000055555571344c in Ffont_shape_gstring (gstring=XIL(0x7ffff1e5301d), direction=XIL(0)) at font.c:4499 #5 0x00005555557019fb in Ffuncall (nargs=3, args=args@entry=0x7fffffffd670) at eval.c:3039 #6 0x000055555573cdf8 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, args=) at bytecode.c:632 #7 0x0000555555701937 in Ffuncall (nargs=nargs@entry=7, args=args@entry=0x7fffffffd990) at eval.c:3055 #8 0x0000555555700cf9 in internal_condition_case_n (bfun= 0x555555701760 , nargs=nargs@entry=7, args=args@entry=0x7fffffffd990, handlers=handlers@entry=XIL(0x30), hfun=hfun@entry= 0x5555555ca5e0 ) at eval.c:1642 #9 0x00005555555b8603 in safe__call (inhibit_quit=inhibit_quit@entry=false, nargs=nargs@entry=7, func=, ap=ap@entry=0x7fffffffda28) at lisp.h:1002 #10 0x00005555555c79b5 in safe_call (nargs=nargs@entry=7, func=) at xdisp.c:3009 #11 0x00005555557609c5 in autocmp_chars (rule=XIL(0x7ffff1e501bd), charpos=charpos@entry=146, bytepos=, limit=, limit@entry=148, win=win@entry=0x555556030100, face=face@entry=0x0, string=XIL(0), direction=XIL(0)) at lisp.h:731 #12 0x000055555576426d in find_automatic_composition (pos=pos@entry=146, limit=146, limit@entry=-1, backlim=backlim@entry=-1, start=start@entry=0x7fffffffdc68, end=end@entry=0x7fffffffdc70, gstring=gstring@entry=0x7fffffffdc78, string=XIL(0)) at composite.c:1661 #13 0x0000555555764f39 in composition_adjust_point (last_pt=last_pt@entry=146, new_pt=new_pt@entry=146) at lisp.h:1002 #14 0x00005555556960ff in command_loop_1 () at keyboard.c:1569 #15 0x00005555557009d7 in internal_condition_case (bfun=bfun@entry=0x555555695020 , handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x55555568bac0 ) at eval.c:1478 #16 0x0000555555686064 in command_loop_2 (ignore=ignore@entry=XIL(0)) at lisp.h:1002 #17 0x0000555555702ed3 in internal_catch (tag=tag@entry=XIL(0xe520), func=func@entry=0x555555686040 , arg=arg@entry=XIL(0)) at eval.c:1198 #18 0x000055555568600b in command_loop () at lisp.h:1002 #19 0x000055555568b6d6 in recursive_edit_1 () at keyboard.c:720 #20 0x000055555568ba02 in Frecursive_edit () at keyboard.c:789 #21 0x00005555555a177f in main (argc=2, argv=) at emacs.c:2308 Lisp Backtrace: "font-shape-gstring" (0xffffd678) "auto-compose-chars" (0xffffd998) (gdb) up #1 0x0000555555774be0 in ftfont_shape_by_flt (lgstring=XIL(0x7ffff1e5301d), font=0x55555604f410, ft_face=0x5555566a2400, otf=0x555556696b60, matrix=0x55555604f508) at ftfont.c:2852 2852 g->g.to = LGLYPH_TO (LGSTRING_GLYPH (lgstring, g->g.to)); (gdb) up #2 0x0000555555775002 in ftfont_shape (lgstring=XIL(0x7ffff1e5301d), direction=XIL(0)) at ftfont.c:2890 2890 return ftfont_shape_by_flt (lgstring, font, ftfont_info->ft_size->face, otf, (gdb) pp lgstring [[# 2453 8204] nil [0 0 2453 20 16 -1 16 12 0 nil] [1 1 8204 658 0 -1 1 15 4 nil] nil nil nil nil nil nil] (gdb) down #1 0x0000555555774be0 in ftfont_shape_by_flt (lgstring=XIL(0x7ffff1e5301d), font=0x55555604f410, ft_face=0x5555566a2400, otf=0x555556696b60, matrix=0x55555604f508) at ftfont.c:2852 2852 g->g.to = LGLYPH_TO (LGSTRING_GLYPH (lgstring, g->g.to)); (gdb) p *g $1 = { g = { c = 2453, code = 0, from = 0, to = 2, xadv = 704, yadv = 0, ascent = 896, descent = 0, lbearing = 64, rbearing = 640, xoff = 0, yoff = 0, encoded = 1, measured = 1, adjusted = 0, internal = 1073741823 }, libotf_positioning_type = 8204 } Robert --