<?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>140653</bug_id>
          
          <creation_ts>2015-01-19 17:59:04 -0800</creation_ts>
          <short_desc>[Win] Layout Test mathml/opentype/munderover-layout-resize.html crashes</short_desc>
          <delta_ts>2016-07-03 13:05:19 -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>MathML</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>159386</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brent Fulgham">bfulgham</reporter>
          <assigned_to name="Brent Fulgham">bfulgham</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>commit-queue</cc>
    
    <cc>dbarton</cc>
    
    <cc>esprehn+autocc</cc>
    
    <cc>fred.wang</cc>
    
    <cc>glenn</cc>
    
    <cc>kondapallykalyan</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>mrobinson</cc>
    
    <cc>sabouhallawa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1062578</commentid>
    <comment_count>0</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2015-01-19 17:59:04 -0800</bug_when>
    <thetext>The following layout test is flaky on Windows:

mathml/presentation/mo-invisible.html

Probable cause:

The test is crashing in RenderMathMLOperator::advanceForGlyph, where the GlyphData contains a nullptr fontData member.

This seems to be happening for UNICODE character 8290, which corresponds to an invisible multiplication symbol.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1062580</commentid>
    <comment_count>1</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2015-01-19 18:07:34 -0800</bug_when>
    <thetext>The GlyphData&apos;s fontData member can be nullptr in the case where FontGlyphs::glyphDataForSystemFallback cannot find a suitable font for the desired character.

When this happens, we return a default-constructed GlyphData which has a null internal fontData member.

This member is dereference later, causing a crash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1062582</commentid>
    <comment_count>2</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2015-01-19 18:11:43 -0800</bug_when>
    <thetext>Actually, the failing test is &quot;mathml/opentype/munderover-layout-resize.html&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1062584</commentid>
    <comment_count>3</comment_count>
      <attachid>244948</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2015-01-19 18:13:01 -0800</bug_when>
    <thetext>Created attachment 244948
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1062585</commentid>
    <comment_count>4</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2015-01-19 18:13:34 -0800</bug_when>
    <thetext>I wonder if this only happens if certain fonts are missing from the test system? DRT should be insuring the right fonts are in place.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1062587</commentid>
    <comment_count>5</comment_count>
      <attachid>244948</attachid>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2015-01-19 18:23:20 -0800</bug_when>
    <thetext>Comment on attachment 244948
Patch

You haven&apos;t described why this flakes. It seems to me that consistently crashing and being flakey are substantially different phenomena.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1062588</commentid>
    <comment_count>6</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2015-01-19 18:23:44 -0800</bug_when>
    <thetext>I think we need to do a little more research to figure out what is going on here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1062627</commentid>
    <comment_count>7</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2015-01-19 20:40:51 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; Comment on attachment 244948 [details]
&gt; Patch
&gt; 
&gt; You haven&apos;t described why this flakes. It seems to me that consistently
&gt; crashing and being flakey are substantially different phenomena.

Yes -- this is a repeatable crash, due to a nullptr dereference as I mentioned elsewhere in this bug.

What I&apos;m not sure about is why this particular test can&apos;t seem to come up with a valid set of font data. Without any other information, I&apos;m guessing it has to do with the use of the &quot;stretchy.woff&quot; font include. Probably something in the Windows port is not properly implemented.

It looks like the style of the MathML element is empty, and for whatever reason the attempt to access UNICODE character 8290 does not find anything suitable in the fallback logic resulting in null font data.

Once that happens, we crash as soon as we attempt to dereference the font data.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1174437</commentid>
    <comment_count>8</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2016-03-14 06:57:08 -0700</bug_when>
    <thetext>@Brent: is it different from bug 140522 (comment 0 mentions 
mathml/presentation/mo-invisible.html and title mathml/opentype/munderover-layout-resize.html)?

Apparently, you&apos;re proposed fix already landed: http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp#L268

I suspect stretchy.woff does not have any character for U+8290 so the glyph of a system font (e.g. Cambria Math) should be used when calling style().fontCascade().glyphDataForCharacter(m_textContent, false). Not sure why it does not work on Windows.

BTW, I&apos;d like to mention that the code will change in the current MathML refactoring (bug 152244 and bug 155018) but they are still calling isValid() before using glyph data.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1207498</commentid>
    <comment_count>9</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2016-07-03 09:31:25 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/202788</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>244948</attachid>
            <date>2015-01-19 18:13:01 -0800</date>
            <delta_ts>2015-01-19 18:23:20 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-140653-20150119181957.patch</filename>
            <type>text/plain</type>
            <size>1781</size>
            <attacher name="Brent Fulgham">bfulgham</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDE3ODY4NykKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE3IEBACisyMDE1LTAxLTE5ICBCcmVudCBG
dWxnaGFtICA8YmZ1bGdoYW1AYXBwbGUuY29tPgorCisgICAgICAgIExheW91dCBUZXN0IG1hdGht
bC9vcGVudHlwZS9tdW5kZXJvdmVyLWxheW91dC1yZXNpemUuaHRtbAorICAgICAgICBodHRwczov
L2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTQwNjUzCisKKyAgICAgICAgUmV2aWV3
ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgRm91bmQgYnkgbWF0aG1sL29wZW50eXBl
L211bmRlcm92ZXItbGF5b3V0LXJlc2l6ZS5odG1sLgorCisgICAgICAgICogcmVuZGVyaW5nL21h
dGhtbC9SZW5kZXJNYXRoTUxPcGVyYXRvci5jcHA6CisgICAgICAgIChXZWJDb3JlOjpSZW5kZXJN
YXRoTUxPcGVyYXRvcjo6Ym91bmRzRm9yR2x5cGgpOiBEb24ndCBkZXJlZmVyZW5jZQorICAgICAg
ICBhIG51bGxwdHIuCisgICAgICAgIChXZWJDb3JlOjpS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3IEBAIGZsb2F0IFJlbmRlck1h
dGhNTE9wZXJhdG9yOjpoZWlnaHRGb3JHbHkKIAogZmxvYXQgUmVuZGVyTWF0aE1MT3BlcmF0b3I6
OmFkdmFuY2VGb3JHbHlwaChjb25zdCBHbHlwaERhdGEmIGRhdGEpIGNvbnN0CiB7Ci0gICAgcmV0
dXJuIGRhdGEuZm9udERhdGEtPndpZHRoRm9yR2x5cGgoZGF0YS5nbHlwaCk7CisgICAgcmV0dXJu
IGRhdGEuZm9udERhdGEgPyBkYXRhLmZvbnREYXRhLT53aWR0aEZvckdseXBoKGRhdGEuZ2x5cGgp
IDogMDsKIH0KIAogdm9pZCBSZW5kZXJNYXRoTUxPcGVyYXRvcjo6Y29tcHV0ZVByZWZlcnJlZExv
Z2ljYWxXaWR0aHMoKQo=
</data>
<flag name="review"
          id="269880"
          type_id="1"
          status="-"
          setter="mmaxfield"
    />
          </attachment>
      

    </bug>

</bugzilla>