<?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>27467</bug_id>
          
          <creation_ts>2009-07-20 16:06:19 -0700</creation_ts>
          <short_desc>Uninitialized memory reference in PlatformContextSkia::currentPathInLocalCoordinates()</short_desc>
          <delta_ts>2009-07-21 02:56:57 -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>WebCore Misc.</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>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="James Hawkins">jhawkins</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>fishd</cc>
    
    <cc>levin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>133283</commentid>
    <comment_count>0</comment_count>
    <who name="James Hawkins">jhawkins</who>
    <bug_when>2009-07-20 16:06:19 -0700</bug_when>
    <thetext>The following tests
LayoutTests/svg/dynamic-updates/SVGMarkerElement-dom-markerHeight-attr.html
LayoutTests/svg/dynamic-updates/SVGMarkerElement-dom-markerWidth-attr.html
LayoutTests/svg/dynamic-updates/SVGMarkerElement-svgdom-markerHeight-prop.html
LayoutTests/svg/dynamic-updates/SVGMarkerElement-svgdom-markerWidth-prop.html

show a valgrind error:

18:47:01 valgrind_analyze.py [ERROR] UninitCondition
Conditional jump or move depends on uninitialised value(s)
  SkMatrix::getType() const (skia/include/corecg/SkMatrix.h:48)
  SkPath::transform(SkMatrix const&amp;, SkPath*) const (skia/sgl/SkPath.cpp:849)
  SkPath::transform(SkMatrix const&amp;) (skia/include/SkPath.h:454)
  PlatformContextSkia::currentPathInLocalCoordinates() const
(third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp:470)
  WebCore::GraphicsContext::fillPath()
(third_party/WebKit/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp:687)
  WebCore::SVGPaintServer::renderPath(WebCore::GraphicsContext*&amp;,
WebCore::RenderObject const*, WebCore::SVGPaintTargetType) const
(third_party/WebKit/WebCore/svg/graphics/SVGPaintServer.cpp:180)
  WebCore::SVGPaintServer::draw(WebCore::GraphicsContext*&amp;, WebCore::RenderObject
const*, WebCore::SVGPaintTargetType) const
(third_party/WebKit/WebCore/svg/graphics/SVGPaintServer.cpp:171)
  WebCore::fillAndStrokePath(WebCore::Path const&amp;, WebCore::GraphicsContext*,
WebCore::RenderStyle*, WebCore::RenderPath*)
(third_party/WebKit/WebCore/rendering/RenderPath.cpp:211)
  WebCore::RenderPath::paint(WebCore::RenderObject::PaintInfo&amp;, int, int)
(third_party/WebKit/WebCore/rendering/RenderPath.cpp:238)
  WebCore::RenderSVGContainer::paint(WebCore::RenderObject::PaintInfo&amp;, int, int)
(third_party/WebKit/WebCore/rendering/RenderSVGContainer.cpp:199)

Uninitialised value was created by a stack allocation
  PlatformContextSkia::currentPathInLocalCoordinates() const
(third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp:464)

The call to matrix.invert fails, leaving inverseMatrix uninitialized.  My fix is to return an empty path.  I will upload a patch soon.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>133284</commentid>
    <comment_count>1</comment_count>
      <attachid>33119</attachid>
    <who name="James Hawkins">jhawkins</who>
    <bug_when>2009-07-20 16:12:49 -0700</bug_when>
    <thetext>Created attachment 33119
Return an empty path in PlatformContextSkia::currentPathInLocalCoordinates if matrix.invert() fails</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>133289</commentid>
    <comment_count>2</comment_count>
      <attachid>33119</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-07-20 16:29:10 -0700</bug_when>
    <thetext>Comment on attachment 33119
Return an empty path in PlatformContextSkia::currentPathInLocalCoordinates if matrix.invert() fails

LGTM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>133426</commentid>
    <comment_count>3</comment_count>
    <who name="David Levin">levin</who>
    <bug_when>2009-07-21 02:56:57 -0700</bug_when>
    <thetext>Committed as http://trac.webkit.org/changeset/46158</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>33119</attachid>
            <date>2009-07-20 16:12:49 -0700</date>
            <delta_ts>2009-07-20 16:29:10 -0700</delta_ts>
            <desc>Return an empty path in PlatformContextSkia::currentPathInLocalCoordinates if matrix.invert() fails</desc>
            <filename>handlebadinvert.diff</filename>
            <type>text/plain</type>
            <size>1544</size>
            <attacher name="James Hawkins">jhawkins</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA0NjEzNSkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTkgQEAKKzIwMDktMDctMjAgIEphbWVzIEhhd2tpbnMgIDxqaGF3a2luc0Bnb29n
bGUuY29tPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAg
IGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0yNzQ2NworICAgICAgICBS
ZXR1cm4gY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hdGZvcm1Db250ZXh0U2tpYS5jcHAJKHdvcmtpbmcgY29weSkKQEAg
LTQ4Miw3ICs0ODIsOCBAQCBTa1BhdGggUGxhdGZvcm1Db250ZXh0U2tpYTo6Y3VycmVudFBhdGhJ
CiAgICAgU2tQYXRoIGxvY2FsUGF0aCA9IG1fcGF0aDsKICAgICBjb25zdCBTa01hdHJpeCYgbWF0
cml4ID0gbV9jYW52YXMtPmdldFRvdGFsTWF0cml4KCk7CiAgICAgU2tNYXRyaXggaW52ZXJzZU1h
dHJpeDsKLSAgICBtYXRyaXguaW52ZXJ0KCZpbnZlcnNlTWF0cml4KTsKKyAgICBpZiAoIW1hdHJp
eC5pbnZlcnQoJmludmVyc2VNYXRyaXgpKQorICAgICAgICByZXR1cm4gU2tQYXRoKCk7CiAgICAg
bG9jYWxQYXRoLnRyYW5zZm9ybShpbnZlcnNlTWF0cml4KTsKICAgICByZXR1cm4gbG9jYWxQYXRo
OwogfQo=
</data>
<flag name="review"
          id="17445"
          type_id="1"
          status="+"
          setter="eric"
    />
          </attachment>
      

    </bug>

</bugzilla>