<?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>20950</bug_id>
          
          <creation_ts>2008-09-19 17:24:49 -0700</creation_ts>
          <short_desc>Reproducible assertion failure running svg/custom/acid3-test-77.html multiple times under guard malloc</short_desc>
          <delta_ts>2008-09-20 17:50:48 -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>SVG</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, NeedsReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Rowe (bdash)">mrowe</reporter>
          <assigned_to>mitz</assigned_to>
          <cc>hyatt</cc>
    
    <cc>mjs</cc>
    
    <cc>mrowe</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>91838</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-09-19 17:24:49 -0700</bug_when>
    <thetext>Running svg/custom/acid3-test-77.html twice in a row under guard malloc leads to an assertion failure:

ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key)
(HashTable.h:443 void WTF::HashTable&lt;Key, Value, Extractor, HashFunctions, Traits, KeyTraits&gt;::checkKey(const T&amp;) [with T = UChar, HashTranslator = WTF::IdentityHashTranslator&lt;UChar, std::pair&lt;UChar, WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt;, WTF::IntHash&lt;unsigned int&gt; &gt;, Key = UChar, Value = std::pair&lt;UChar, WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt;, Extractor = WTF::PairFirstExtractor&lt;std::pair&lt;UChar, WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt; &gt;, HashFunctions = WTF::IntHash&lt;unsigned int&gt;, Traits = WTF::PairHashTraits&lt;WTF::HashTraits&lt;UChar&gt;, WTF::HashTraits&lt;WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt; &gt;, KeyTraits = WTF::HashTraits&lt;UChar&gt;])

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xbbadbeef
#0  0x03cd098b in WTF::HashTable&lt;unsigned short, std::pair&lt;unsigned short, WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt;, WTF::PairFirstExtractor&lt;std::pair&lt;unsigned short, WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt; &gt;, WTF::IntHash&lt;unsigned int&gt;, WTF::PairHashTraits&lt;WTF::HashTraits&lt;unsigned short&gt;, WTF::HashTraits&lt;WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt; &gt;, WTF::HashTraits&lt;unsigned short&gt; &gt;::checkKey&lt;unsigned short, WTF::IdentityHashTranslator&lt;unsigned short, std::pair&lt;unsigned short, WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt;, WTF::IntHash&lt;unsigned int&gt; &gt; &gt; (this=0xd6b5cfe4, key=@0xbfffe056) at HashTable.h:443
#1  0x03cd0a5c in WTF::HashTable&lt;unsigned short, std::pair&lt;unsigned short, WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt;, WTF::PairFirstExtractor&lt;std::pair&lt;unsigned short, WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt; &gt;, WTF::IntHash&lt;unsigned int&gt;, WTF::PairHashTraits&lt;WTF::HashTraits&lt;unsigned short&gt;, WTF::HashTraits&lt;WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt; &gt;, WTF::HashTraits&lt;unsigned short&gt; &gt;::lookup&lt;unsigned short, WTF::IdentityHashTranslator&lt;unsigned short, std::pair&lt;unsigned short, WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt;, WTF::IntHash&lt;unsigned int&gt; &gt; &gt; (this=0xd6b5cfe4, key=@0xbfffe056) at HashTable.h:457
#2  0x03cd0b26 in WTF::HashTable&lt;unsigned short, std::pair&lt;unsigned short, WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt;, WTF::PairFirstExtractor&lt;std::pair&lt;unsigned short, WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt; &gt;, WTF::IntHash&lt;unsigned int&gt;, WTF::PairHashTraits&lt;WTF::HashTraits&lt;unsigned short&gt;, WTF::HashTraits&lt;WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt; &gt;, WTF::HashTraits&lt;unsigned short&gt; &gt;::lookup (this=0xd6b5cfe4, key=@0xbfffe056) at HashTable.h:330
#3  0x03cd0b40 in WTF::HashMap&lt;unsigned short, WTF::RefPtr&lt;WebCore::GlyphMapNode&gt;, WTF::IntHash&lt;unsigned int&gt;, WTF::HashTraits&lt;unsigned short&gt;, WTF::HashTraits&lt;WTF::RefPtr&lt;WebCore::GlyphMapNode&gt; &gt; &gt;::get (this=0xd6b5cfe4, key=@0xbfffe056) at HashMap.h:207
#4  0x03cd0bc5 in WebCore::SVGGlyphMap::get (this=0xd68f4fd4, string=@0xbfffe144, glyphs=@0xbfffe138) at SVGGlyphMap.h:84
#5  0x03ccd68c in WebCore::SVGFontElement::getGlyphIdentifiersForString (this=0xd68f4f30, string=@0xbfffe144, glyphs=@0xbfffe138) at WebCore/svg/SVGFontElement.cpp:237
#6  0x03cd5699 in WebCore::SVGTextRunWalker&lt;WebCore::SVGTextRunWalkerMeasuredLengthData&gt;::walk (this=0xbfffe278, run=@0xbfffe390, isVerticalText=false, language=@0xbfffe28c, from=0, to=1) at WebCore/svg/SVGFont.cpp:278
#7  0x03cd3c0d in floatWidthOfSubStringUsingSVGFont (font=0xd679cfa8, run=@0xbfffe390, extraCharsAvailable=1, from=0, to=1, charsConsumed=@0xbfffe420, glyphName=@0xbfffe41c) at WebCore/svg/SVGFont.cpp:415
#8  0x03cd3ddb in WebCore::Font::floatWidthUsingSVGFont (this=0xd679cfa8, run=@0xbfffe390, extraCharsAvailable=1, charsConsumed=@0xbfffe420, glyphName=@0xbfffe41c) at WebCore/svg/SVGFont.cpp:433
#9  0x037ee0b9 in WebCore::Font::floatWidth (this=0xd679cfa8, run=@0xbfffe390, extraCharsAvailable=1, charsConsumed=@0xbfffe420, glyphName=@0xbfffe41c) at WebCore/platform/graphics/Font.cpp:724
#10 0x03ba10fa in WebCore::SVGInlineTextBox::calculateGlyphWidth (this=0xd6b86fbc, style=0xd6794fbc, offset=2, extraCharsAvailable=1, charsConsumed=@0xbfffe420, glyphName=@0xbfffe41c) at WebCore/rendering/SVGInlineTextBox.cpp:80
#11 0x03bfc212 in WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback (this=0xbfffe5a8, textBox=0xd6b86fbc, startOffset=0, chunkCtm=@0xd6bdec4c, start=@0xbfffe4ec, end=@0xbfffe4e8) at WebCore/svg/SVGTextContentElement.cpp:201
#12 0x03c0018b in WebCore::SVGTextChunkWalker&lt;WebCore::SVGInlineTextBoxQueryWalker&gt;::operator() (this=0xbfffe5e8, textBox=0xd6b86fbc, startOffset=0, chunkCtm=@0xd6bdec4c, start=@0xbfffe4ec, end=@0xbfffe4e8) at SVGCharacterLayoutInfo.h:342
#13 0x03be5e8f in WebCore::SVGRootInlineBox::walkTextChunks (this=0xd6b88f7c, walker=0xbfffe5e8, textBox=0xd6b86fbc) at WebCore/rendering/SVGRootInlineBox.cpp:1686
#14 0x03bfa999 in executeTextQuery (element=0xd2548e80, mode=WebCore::SVGInlineTextBoxQueryWalker::EndPosition, startPosition=2, length=0, referencePoint={m_x = 0, m_y = 0}) at WebCore/svg/SVGTextContentElement.cpp:360
#15 0x03bfb32f in WebCore::SVGTextContentElement::getEndPositionOfChar (this=0xd2548e80, charnum=2, ec=@0xbfffe728) at WebCore/svg/SVGTextContentElement.cpp:417
#16 0x03a16958 in WebCore::jsSVGTextContentElementPrototypeFunctionGetEndPositionOfChar (exec=0xbfffe8cc, thisValue=0x1083560, args=@0xbfffe774) at WebKitBuild/Debug/DerivedSources/WebCore/JSSVGTextContentElement.cpp:324
#17 0x004fbaa6 in JSC::Machine::cti_op_call_NotJSFunction (args=0xc74fbf90) at JavaScriptCore/VM/Machine.cpp:4423


The Mac OS X Intel Debug build bot hits this assertion failure very, very frequently.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91839</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-09-19 17:25:28 -0700</bug_when>
    <thetext>&lt;rdar://problem/6234059&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91840</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-09-19 17:40:26 -0700</bug_when>
    <thetext>Assertion failure is in SVGFont-related code, which looks to have been written by Nikolas, but touched recently by Dave, Maciej and Dan.  In particular &lt;http://trac.webkit.org/changeset/31836&gt; touched SVGTextRunWalker::walk, which looks to be where things start going obviously wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91841</commentid>
    <comment_count>3</comment_count>
    <who name="">mitz</who>
    <bug_when>2008-09-19 17:42:45 -0700</bug_when>
    <thetext>I think this is a duplicate of bug 18830.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91842</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-09-19 17:43:59 -0700</bug_when>
    <thetext>Good catch.

*** This bug has been marked as a duplicate of 18830 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91912</commentid>
    <comment_count>5</comment_count>
    <who name="">mitz</who>
    <bug_when>2008-09-20 11:35:45 -0700</bug_when>
    <thetext>Looks like the root cause in this case is different from that of bug 18830 after all, and this one is easy to fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91915</commentid>
    <comment_count>6</comment_count>
      <attachid>23608</attachid>
    <who name="">mitz</who>
    <bug_when>2008-09-20 11:55:14 -0700</bug_when>
    <thetext>Created attachment 23608
Fix an off-by-one error</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91919</commentid>
    <comment_count>7</comment_count>
      <attachid>23608</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-09-20 13:17:24 -0700</bug_when>
    <thetext>Comment on attachment 23608
Fix an off-by-one error

Seems this should be pulled out into a nicely named local variable, possibly with a comment explaining why it does not include the first char (or maybe that&apos;s obvious from the code).

int remainingCharsInRun = end - it;

or similar.  I would like to see a local variable used when you land, but I don&apos;t need to see the patch again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91954</commentid>
    <comment_count>8</comment_count>
    <who name="">mitz</who>
    <bug_when>2008-09-20 17:50:48 -0700</bug_when>
    <thetext>Fixed in &lt;http://trac.webkit.org/changeset/36723&gt;.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>23608</attachid>
            <date>2008-09-20 11:55:14 -0700</date>
            <delta_ts>2008-09-20 13:17:24 -0700</delta_ts>
            <desc>Fix an off-by-one error</desc>
            <filename>20950_r1.diff</filename>
            <type>text/plain</type>
            <size>1796</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2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gICBtX3N0b3BQcm9jZXNzaW5nID0gdHJ1ZTsK
ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwo=
</data>
<flag name="review"
          id="10576"
          type_id="1"
          status="+"
          setter="eric"
    />
          </attachment>
      

    </bug>

</bugzilla>