GNU bug report logs - #49066
26.3; Segmentation fault on specific utf8 string

Previous Next

Package: emacs;

Reported by: "Miguel V. S. Frasson" <mvsfrasson <at> gmail.com>

Date: Wed, 16 Jun 2021 21:08:02 UTC

Severity: normal

Tags: patch

Found in version 26.3

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #53 received at 49066 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: handa <handa <at> gnu.org>
Cc: 49066 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, eggert <at> cs.ucla.edu,
 larsi <at> gnus.org, mvsfrasson <at> gmail.com
Subject: Re: bug#49066: 26.3; Segmentation fault on specific utf8 string
Date: Mon, 05 Jul 2021 11:28:43 +0200
>>>>> On Sat, 03 Jul 2021 11:05:05 +0900, handa <handa <at> gnu.org> said:

    handa> In article <83bl7qp52q.fsf <at> gnu.org>, Eli Zaretskii <eliz <at> gnu.org> 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
-- 




This bug report was last modified 3 years and 306 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.