<?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>26453</bug_id>
          
          <creation_ts>2009-06-16 13:07:01 -0700</creation_ts>
          <short_desc>Null Cairo context will crash Windows Cairo Build</short_desc>
          <delta_ts>2009-06-16 13:31:25 -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>WebKit Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</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>1</everconfirmed>
          <reporter name="Brent Fulgham">bfulgham</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>126266</commentid>
    <comment_count>0</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2009-06-16 13:07:01 -0700</bug_when>
    <thetext>The DRT test suite identified a crash bug in the Windows Cairo build.

If a null platform graphics context is passed to the GraphicsContext constructor, e.g., from Line 3724 in RenderBlock.cpp:

        GraphicsContext context((PlatformGraphicsContext*)0);

The internal Windows Cairo sync function (which attempts to keep the Windows DC in sync with the Cairo one) will crash when it attempts to retrieve the Cairo surface from the null pointer (see Line 180 in GraphicsContextCairoWin.cpp):

    cairo_surface_t* surface = cairo_get_target(cr);

The fix is to check for a null pointer before attempting to do so.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126271</commentid>
    <comment_count>1</comment_count>
      <attachid>31367</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2009-06-16 13:13:02 -0700</bug_when>
    <thetext>Created attachment 31367
Null check.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126273</commentid>
    <comment_count>2</comment_count>
      <attachid>31367</attachid>
    <who name="Xan Lopez">xan.lopez</who>
    <bug_when>2009-06-16 13:24:04 -0700</bug_when>
    <thetext>Comment on attachment 31367
Null check.

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126274</commentid>
    <comment_count>3</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2009-06-16 13:31:25 -0700</bug_when>
    <thetext>Landed in http://trac.webkit.org/changeset/44734</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>31367</attachid>
            <date>2009-06-16 13:13:02 -0700</date>
            <delta_ts>2009-06-16 13:24:04 -0700</delta_ts>
            <desc>Null check.</desc>
            <filename>null_cr_crash.patch</filename>
            <type>text/plain</type>
            <size>1351</size>
            <attacher name="Brent Fulgham">bfulgham</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA0NDczMykKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTcgQEAKKzIwMDktMDYtMTYgIEJyZW50IEZ1bGdoYW0gIDxiZnVsZ2hhbUB3ZWJr
aXQub3JnPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAg
IFRlc3Q6IGZhc3QvbXVsdGljb2wvY29sdW1ucy1zaG9ydG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AKIHZvaWQgR3JhcGhp
Y3NDb250ZXh0UGxhdGZvcm1Qcml2YXRlOjpzeW5jQ29udGV4dChQbGF0Zm9ybUdyYXBoaWNzQ29u
dGV4dCogY3IpCiB7CisgICAgaWYgKCFjcikKKyAgICAgICByZXR1cm47CisKICAgICBjYWlyb19z
dXJmYWNlX3QqIHN1cmZhY2UgPSBjYWlyb19nZXRfdGFyZ2V0KGNyKTsKICAgICBtX2hkYyA9IGNh
aXJvX3dpbjMyX3N1cmZhY2VfZ2V0X2RjKHN1cmZhY2UpOyAgIAogCg==
</data>
<flag name="review"
          id="16037"
          type_id="1"
          status="+"
          setter="xan.lopez"
    />
          </attachment>
      

    </bug>

</bugzilla>