<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>231686</bug_id>
          
          <creation_ts>2021-10-13 10:55:55 -0700</creation_ts>
          <short_desc>Browser crashes when drawing Japanese text on a canvas with some fonts</short_desc>
          <delta_ts>2021-10-14 23:05:49 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Canvas</component>
          <version>Safari 15</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>230187</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mouad Debbar">mouad.debbar</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1803860</commentid>
    <comment_count>0</comment_count>
    <who name="Mouad Debbar">mouad.debbar</who>
    <bug_when>2021-10-13 10:55:55 -0700</bug_when>
    <thetext>## TL;DR

Repro: https://jsfiddle.net/9w2u1z7k/9/show

Simply load the repro link above on an iPhone iOS 15 Safari. The browser will crash.

Older versions of iOS work fine, so this is a regression in iOS 15.


## Details

When drawing Japanese or Chinese text on a canvas (e.g. &quot;こんにちは世界&quot; or &quot;測試&quot;) with a font chain that includes &quot;-apple-system&quot;, the browser crashes.

The problem disappears if the text is in English (e.g. &quot;Hello World&quot;).
The problem also disappears if &quot;-apple-system&quot; is removed from the font family chain.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1803939</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-10-13 13:28:49 -0700</bug_when>
    <thetext>&lt;rdar://problem/84213820&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1804593</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2021-10-14 16:45:47 -0700</bug_when>
    <thetext>Duplicate of bug 230187?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1804633</commentid>
    <comment_count>3</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2021-10-14 18:02:26 -0700</bug_when>
    <thetext>(In reply to Alexey Proskuryakov from comment #2)
&gt; Duplicate of bug 230187?

I&apos;ve confirmed that it does not reproduce for me on a build of macOS that contains that fix.

I think it&apos;s safe to assume that it&apos;s a dupe of #230187.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1804706</commentid>
    <comment_count>4</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2021-10-14 23:05:49 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 230187 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>