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, 05 Jul 2021 11:28:43 +0200 Message-ID: <87k0m5cdo4.fsf@gmail.com> References: <87zgv4cfu6.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="30365"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49066@debbugs.gnu.org, eggert@cs.ucla.edu, larsi@gnus.org, mvsfrasson@gmail.com To: handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 05 11:29:28 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 1m0Kus-0007fJ-Er for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 11:29:26 +0200 Original-Received: from localhost ([::1]:37342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0Kuq-00087L-PQ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 05:29:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0KuX-00086E-QK for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2021 05:29:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60722) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0KuU-0000PV-BZ for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2021 05:29:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0KuU-0007Ky-A4 for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2021 05:29: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, 05 Jul 2021 09:29: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.162547733528190 (code B ref 49066); Mon, 05 Jul 2021 09:29:02 +0000 Original-Received: (at 49066) by debbugs.gnu.org; 5 Jul 2021 09:28:55 +0000 Original-Received: from localhost ([127.0.0.1]:44035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0KuM-0007Kc-Vz for submit@debbugs.gnu.org; Mon, 05 Jul 2021 05:28:55 -0400 Original-Received: from mail-wm1-f47.google.com ([209.85.128.47]:46783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0KuJ-0007KO-Dl for 49066@debbugs.gnu.org; Mon, 05 Jul 2021 05:28:53 -0400 Original-Received: by mail-wm1-f47.google.com with SMTP id k16-20020a05600c1c90b02901f4ed0fcfe7so9781639wms.5 for <49066@debbugs.gnu.org>; Mon, 05 Jul 2021 02:28: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; bh=w3bnV15PwDZMvAVl0K7sb19GiwzvhT6TGq5Xp2qLjE0=; b=LUrbntSxqWInYLrMJ5IRZm4FlASVXm7XontA9yI6+65WgWgxKjKHlpStimcaA2zZaQ AMjcJLSqsCLPtZvBVA5WdvKdvZkaGrCVUcsVufeGAH4QzJglY6Th98noqWTURMENhnf3 B14W9obkntOtqWSrIgDiAm7ev3M0Pi3FDa/dBR7UvC/XzlZSqz+ba13zkwEM/hNiHhDY AAiOH8dsLuIZGNweJzgAznwcqjWkAT50zjjIHv9ZZiNjIRlA3aI33I48HvNH7/GqFdNK vB7btqvl2CWNvDXsVWEmpav30Lcsvokn7yp0iHZiEYeehIk0vp2m7pbEOrjkbCSaI3Sq RvYQ== 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=w3bnV15PwDZMvAVl0K7sb19GiwzvhT6TGq5Xp2qLjE0=; b=RfayM7CONiFf4pZjhPSG1beMq7t6CRWdcpBwhhTo7u8ZiOyb+fOrJ7R6h9JvcyzNH0 rOiLvLgfMASVSlR4ueLYBOX0BuAJ43U7x8jNc2V/rN0hxT6s8swS3LRSMVwkgozPTnDq 4R8VLTXB90Nf2Rmg3+eJXOZ3sIHrs9J1pD8LkjzRlnD6GSwo5i2HYRsfXjzbXfVyyM6p 98EASqSHImNQgV12hfbnaApAPNgqYVwYKpeOSPBgiBjPZjo3xUyUQKg4aB0q+56UI7V3 9HXrNdATqgfMFFSpx6s9YJzY8Lx46mYdmP28fi2VaRqt8pfAaQjlS/ZtezvlL7WKQlQ8 T8Lw== X-Gm-Message-State: AOAM531jxz2aXz8Py8dQ821zd9H2Ys67K8IwJr3jxQq6DGgri+841RKZ Dl2i+4fUmbRTMKFDmUU+fYI= X-Google-Smtp-Source: ABdhPJyRPHo/zI1Ew4TrswYCFzHN0Po5oq4lqXqfJwU+7/M2UtPeV9qgTGBss7jcssGwTfGvxOcwhw== X-Received: by 2002:a05:600c:350e:: with SMTP id h14mr7986358wmq.68.1625477325380; Mon, 05 Jul 2021 02:28:45 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id a186sm14578193wme.25.2021.07.05.02.28.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 02:28:44 -0700 (PDT) In-Reply-To: <87zgv4cfu6.fsf@gnu.org> (handa@gnu.org's message of "Sat, 03 Jul 2021 11:05:05 +0900") 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:209441 Archived-At: >>>>> On Sat, 03 Jul 2021 11:05:05 +0900, handa said: handa> In article <83bl7qp52q.fsf@gnu.org>, Eli Zaretskii writes: >> > With the patch it still crashes for me in emacs-master with harfbuzz disabled: >> Too bad. >> Kenichi, any suggestions? handa> I checked the code again, and found that it was a fault of m17n-lib handa> which was not robust enough to handle an OTF table that is different handa> from what the library expects. handa> Here is a revised patch to handle such a case. Could you please try it? Thanks, that fixes the crash, and results in the ZWNJ being composed. >> Btw, I think there's a bug in those patterns: ZWJ and ZWNJ shouldn't >> compose unless they are followed by a character. See section 12.2 in >> the Unicode Standard. handa> Even if they should not be composed with, we must include them in the handa> string to shape because their existence may change the glyph of the handa> previous character. A shaper (m17n-lib or harfbuzz) must return a glyph handa> string that has an independent grapheme cluster for the last ZWJ/ZWNJ. handa> At the time of developing m17n-lib, the above rule was not clear. To handa> conform to that rule, please to put the attached BNG2-OTF.flt under the handa> directory ~/.m17n.d/. I believe you, but I did not test this specifically. Robert --