<?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>254942</bug_id>
          
          <creation_ts>2023-04-03 13:44:31 -0700</creation_ts>
          <short_desc>REGRESSION(262518@main) [cairo] Crash under GraphicsContextGL::paintToCanvas</short_desc>
          <delta_ts>2023-04-04 05:18:17 -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>Platform</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fujii Hironori">fujii</reporter>
          <assigned_to name="Fujii Hironori">fujii</assigned_to>
          <cc>djg</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1946304</commentid>
    <comment_count>0</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-04-03 13:44:31 -0700</bug_when>
    <thetext>Windows port is crashing for some WebGL tests after 262518@main.

Regressions: Unexpected crashes (42)
  webgl/2.0.0/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html [ Crash ]
  webgl/2.0.0/conformance/canvas/draw-webgl-to-canvas-test.html [ Crash ]
  webgl/2.0.0/conformance/canvas/to-data-url-test.html [ Crash ]
  webgl/2.0.0/conformance/textures/misc/texture-hd-dpi.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r11f_g11f_b10f-rgb-float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r11f_g11f_b10f-rgb-half_float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r16f-red-float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r16f-red-half_float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r32f-red-float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r8-red-unsigned_byte.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r8ui-red_integer-unsigned_byte.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rg16f-rg-float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rg16f-rg-half_float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rg32f-rg-float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rg8-rg-unsigned_byte.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rg8ui-rg_integer-unsigned_byte.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb16f-rgb-float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb16f-rgb-half_float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb32f-rgb-float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb565-rgb-unsigned_byte.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb565-rgb-unsigned_short_5_6_5.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb5_a1-rgba-unsigned_byte.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb5_a1-rgba-unsigned_short_5_5_5_1.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb8-rgb-unsigned_byte.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb8ui-rgb_integer-unsigned_byte.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb9_e5-rgb-float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb9_e5-rgb-half_float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgba16f-rgba-float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgba16f-rgba-half_float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgba32f-rgba-float.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgba4-rgba-unsigned_short_4_4_4_4.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgba8-rgba-unsigned_byte.html [ Crash ]
  webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgba8ui-rgba_integer-unsigned_byte.html [ Crash ]
  webgl/2.0.y/conformance/canvas/to-data-url-test.html [ Crash ]
  webgl/2.0.y/conformance/ogles/GL/abs/abs_001_to_006.html [ Crash ]
  webgl/2.0.y/conformance/ogles/GL/acos/acos_001_to_006.html [ Crash ]
  webgl/2.0.y/conformance/ogles/GL/default/default_001_to_001.html [ Crash ]
  webgl/2.0.y/conformance/ogles/GL/degrees/degrees_001_to_006.html [ Crash ]
  webgl/2.0.y/conformance/ogles/GL/min/min_001_to_006.html [ Crash ]
  webgl/2.0.y/conformance/ogles/GL/mix/mix_001_to_006.html [ Crash ]
  webgl/draw-webgl-to-context2d-memory-test.html [ Crash ]

Call stack:

&gt; [Inline Frame] cairo.dll!scaled_nearest_scanline_8888_8888_cover_SRC(unsigned int * dst, const unsigned int * w, int vx, int) Line 1185	C
&gt; [Inline Frame] cairo.dll!scaled_nearest_scanline_8888_8888_cover_SRC_8888_8888_cover_SRC_wrapper(const unsigned char * src, unsigned int * vx, const unsigned int *) Line 1185	C
&gt; cairo.dll!fast_composite_scaled_nearest_8888_8888_cover_SRC(pixman_implementation_t * imp, pixman_composite_info_t * info) Line 1185	C
&gt; cairo.dll!pixman_image_composite32(pixman_op_t op, pixman_image * src, pixman_image * mask, pixman_image * dest, int src_x, int src_y, int mask_x, int mask_y, int dest_x, int dest_y, int width, int height) Line 700	C
&gt; cairo.dll!composite_boxes(void * _dst, _cairo_operator op, _cairo_surface * abstract_src, _cairo_surface * abstract_mask, int src_x, int src_y, int mask_x, int mask_y, int dst_x, int dst_y, _cairo_boxes_t * boxes, const _cairo_rectangle_int * extents) Line 538	C
&gt; cairo.dll!composite_aligned_boxes(const cairo_spans_compositor * compositor, const _cairo_composite_rectangles * extents, _cairo_boxes_t * boxes) Line 688	C
&gt; cairo.dll!clip_and_composite_boxes(const cairo_spans_compositor * compositor, _cairo_composite_rectangles * extents, _cairo_boxes_t * boxes) Line 883	C
&gt; cairo.dll!_cairo_spans_compositor_paint(const cairo_compositor * _compositor, _cairo_composite_rectangles * extents) Line 1000	C
&gt; cairo.dll!_cairo_compositor_paint(const cairo_compositor * compositor, _cairo_surface * surface, _cairo_operator op, const _cairo_pattern * source, const _cairo_clip * clip) Line 67	C
&gt; cairo.dll!_cairo_image_surface_paint(void * abstract_surface, _cairo_operator op, const _cairo_pattern * source, const _cairo_clip * clip) Line 947	C
&gt; cairo.dll!_cairo_surface_paint(_cairo_surface * surface, _cairo_operator op, const _cairo_pattern * source, const _cairo_clip * clip) Line 2213	C
&gt; cairo.dll!_cairo_gstate_paint(_cairo_gstate * gstate) Line 1100	C
&gt; cairo.dll!_cairo_default_context_paint_with_alpha(void * abstract_cr, double alpha) Line 996	C
&gt; cairo.dll!cairo_paint_with_alpha(_cairo * cr, double alpha) Line 2301	C
&gt; WebCore.dll!WebCore::Cairo::drawPatternToCairoContext(_cairo * cr, _cairo_pattern * pattern, const WebCore::FloatRect &amp; destRect, float alpha) Line 157	C++
&gt; WebCore.dll!WebCore::Cairo::drawSurface(WebCore::GraphicsContextCairo &amp; platformContext, _cairo_surface * surface, const WebCore::FloatRect &amp; destRect, const WebCore::FloatRect &amp; originalSrcRect, WebCore::InterpolationQuality imageInterpolationQuality, float globalAlpha, const WebCore::Cairo::ShadowState &amp; shadowState, WebCore::Cairo::OrientationSizing orientationSizing) Line 946	C++
&gt; WebCore.dll!WebCore::Cairo::drawPlatformImage(WebCore::GraphicsContextCairo &amp; platformContext, _cairo_surface * surface, const WebCore::FloatRect &amp; destRect, const WebCore::FloatRect &amp; srcRect, const WebCore::ImagePaintingOptions &amp; options, float globalAlpha, const WebCore::Cairo::ShadowState &amp; shadowState) Line 850	C++
&gt; WebCore.dll!WebCore::GraphicsContextCairo::drawNativeImageInternal(WebCore::NativeImage &amp; nativeImage, const WebCore::FloatSize &amp; __formal, const WebCore::FloatRect &amp; destRect, const WebCore::FloatRect &amp; srcRect, const WebCore::ImagePaintingOptions &amp; options) Line 148	C++
&gt; WebCore.dll!WebCore::NativeImage::draw(WebCore::GraphicsContext &amp; context, const WebCore::FloatSize &amp; imageSize, const WebCore::FloatRect &amp; destinationRect, const WebCore::FloatRect &amp; sourceRect, const WebCore::ImagePaintingOptions &amp; options) Line 69	C++
&gt; WebCore.dll!WebCore::GraphicsContext::drawNativeImage(WebCore::NativeImage &amp; image, const WebCore::FloatSize &amp; imageSize, const WebCore::FloatRect &amp; destination, const WebCore::FloatRect &amp; source, const WebCore::ImagePaintingOptions &amp; options) Line 281	C++
&gt; WebCore.dll!WebCore::GraphicsContextGL::paintToCanvas(WebCore::NativeImage &amp; image, const WebCore::IntSize &amp; canvasSize, WebCore::GraphicsContext &amp; context) Line 707	C++
&gt; WebKit2.dll!WebKit::RemoteGraphicsContextGL::paintNativeImageToImageBuffer::__l2::&lt;lambda_1&gt;::operator()() Line 271	C++
&gt; WebKit2.dll!WTF::Detail::CallableWrapper&lt;`WebKit::RemoteGraphicsContextGL::paintNativeImageToImageBuffer&apos;::`2&apos;::&lt;lambda_1&gt;,void&gt;::call() Line 53	C++
&gt; WebKit2.dll!WTF::Function&lt;void __cdecl(void)&gt;::operator()() Line 83	C++
&gt; WebKit2.dll!IPC::StreamConnectionWorkQueue::processStreams() Line 151	C++
&gt; WebKit2.dll!IPC::StreamConnectionWorkQueue::startProcessingThread::__l2::&lt;lambda_1&gt;::operator()() Line 117	C++
&gt; WebKit2.dll!WTF::Detail::CallableWrapper&lt;`IPC::StreamConnectionWorkQueue::startProcessingThread&apos;::`2&apos;::&lt;lambda_1&gt;,void&gt;::call() Line 53	C++
&gt; WTF.dll!WTF::Function&lt;void __cdecl(void)&gt;::operator()() Line 83	C++
&gt; WTF.dll!WTF::Thread::entryPoint(WTF::Thread::NewThreadContext * newThreadContext) Line 250	C++
&gt; WTF.dll!WTF::wtfThreadEntryPoint(void * data) Line 151	C++
&gt; ucrtbase.dll!00007ff8990e1bb2()	Unknown
&gt; kernel32.dll!00007ff89b087614()	Unknown
&gt; ntdll.dll!00007ff89b1c26a1()	Unknown</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1946356</commentid>
    <comment_count>1</comment_count>
    <who name="Dan Glastonbury">djg</who>
    <bug_when>2023-04-03 16:43:50 -0700</bug_when>
    <thetext>Please let me know if I can assist with fixing this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1946398</commentid>
    <comment_count>2</comment_count>
      <attachid>465756</attachid>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-04-03 19:37:44 -0700</bug_when>
    <thetext>Created attachment 465756
WIP patch

GraphicsContextGLANGLE::withDrawingBufferAsNativeImage has to retain pixelBuffer until the function `func` is called.
Is this a cairo specific problem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1946401</commentid>
    <comment_count>3</comment_count>
      <attachid>465757</attachid>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-04-03 19:40:58 -0700</bug_when>
    <thetext>Created attachment 465757
Patch of using cairo_image_surface_create (doesn&apos;t work as expected)

Using cairo_image_surface_create instead of cairo_image_surface_create_for_data can avoid crashing.
But, a lot of tests fail.
It seems that GraphicsContextGL::createNativeImageFromPixelBuffer has to return a NativeImage that is using the given pixel buffer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1946412</commentid>
    <comment_count>4</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-04-03 20:34:22 -0700</bug_when>
    <thetext>(In reply to Fujii Hironori from comment #2)
&gt; Is this a cairo specific problem?

GraphicsContextGLCG.cpp retains the given PixelBuffer into dataProvider.
https://github.com/WebKit/WebKit/blob/565c294fbf5fe2ba6ef15fbb52f561bd5b7e1420/Source/WebCore/platform/graphics/cg/GraphicsContextGLCG.cpp#L527-L528</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1946439</commentid>
    <comment_count>5</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-04-03 22:47:43 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/12365</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1946498</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-04-04 05:17:19 -0700</bug_when>
    <thetext>Committed 262575@main (fc5e0e6a297b): &lt;https://commits.webkit.org/262575@main&gt;

Reviewed commits have been landed. Closing PR #12365 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1946499</commentid>
    <comment_count>7</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-04-04 05:18:17 -0700</bug_when>
    <thetext>&lt;rdar://problem/107607083&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>465756</attachid>
            <date>2023-04-03 19:37:44 -0700</date>
            <delta_ts>2023-04-03 22:47:59 -0700</delta_ts>
            <desc>WIP patch</desc>
            <filename>wip.patch</filename>
            <type>text/plain</type>
            <size>728</size>
            <attacher name="Fujii Hironori">fujii</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL3BsYXRmb3JtL2dyYXBoaWNzL2FuZ2xlL0dyYXBo
aWNzQ29udGV4dEdMQU5HTEUuY3BwIGIvU291cmNlL1dlYkNvcmUvcGxhdGZvcm0vZ3JhcGhpY3Mv
YW5nbGUvR3JhcGhpY3NDb250ZXh0R0xBTkdMRS5jcHAKaW5kZXggY2Y5MDNjNWRjODY1Li42MWQ3
ODFjMmI1YzYgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJDb3JlL3BsYXRmb3JtL2dyYXBoaWNzL2Fu
Z2xlL0dyYXBoaWNzQ29udGV4dEdMQU5HTEUuY3BwCisrKyBiL1NvdXJjZS9XZWJDb3JlL3BsYXRm
b3JtL2dyYXBoaWNzL2FuZ2xlL0dyYXBoaWNzQ29udGV4dEdMQU5HTEUuY3BwCkBAIC0zMjAzLDYg
KzMyMDMsOSBAQCB2b2lkIEdyYXBoaWNzQ29udGV4dEdMQU5HTEU6OndpdGhEcmF3aW5nQnVmZmVy
QXNOYXRpdmVJbWFnZShzdGQ6OmZ1bmN0aW9uPHZvaWQoTgogICAgIGF1dG8gcGl4ZWxCdWZmZXIg
PSByZWFkUmVuZGVyaW5nUmVzdWx0cygpOwogICAgIGlmICghcGl4ZWxCdWZmZXIpCiAgICAgICAg
IHJldHVybjsKKyNpZiBVU0UoQ0FJUk8pCisgICAgYXV0byBwcm90ZWN0ZWRQaXhlbEJ1ZmZlciA9
IHBpeGVsQnVmZmVyOworI2VuZGlmCiAKICAgICBhdXRvIGRyYXdpbmdJbWFnZSA9IGNyZWF0ZU5h
dGl2ZUltYWdlRnJvbVBpeGVsQnVmZmVyKGNvbnRleHRBdHRyaWJ1dGVzKCksIHBpeGVsQnVmZmVy
LnJlbGVhc2VOb25OdWxsKCkpOwogICAgIGlmICghZHJhd2luZ0ltYWdlKQo=
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>465757</attachid>
            <date>2023-04-03 19:40:58 -0700</date>
            <delta_ts>2023-04-03 19:42:14 -0700</delta_ts>
            <desc>Patch of using cairo_image_surface_create (doesn&apos;t work as expected)</desc>
            <filename>wip.2.patch</filename>
            <type>text/plain</type>
            <size>2498</size>
            <attacher name="Fujii Hironori">fujii</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL3BsYXRmb3JtL2dyYXBoaWNzL2NhaXJvL0dyYXBo
aWNzQ29udGV4dEdMQ2Fpcm8uY3BwIGIvU291cmNlL1dlYkNvcmUvcGxhdGZvcm0vZ3JhcGhpY3Mv
Y2Fpcm8vR3JhcGhpY3NDb250ZXh0R0xDYWlyby5jcHAKaW5kZXggN2E0NWQzNTM5N2FlLi5iZWM3
NzdjMDE5MjggMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJDb3JlL3BsYXRmb3JtL2dyYXBoaWNzL2Nh
aXJvL0dyYXBoaWNzQ29udGV4dEdMQ2Fpcm8uY3BwCisrKyBiL1NvdXJjZS9XZWJDb3JlL3BsYXRm
b3JtL2dyYXBoaWNzL2NhaXJvL0dyYXBoaWNzQ29udGV4dEdMQ2Fpcm8uY3BwCkBAIC0xMTAsMjQg
KzExMCwzNSBAQCBSZWZQdHI8TmF0aXZlSW1hZ2U+IEdyYXBoaWNzQ29udG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yAyNTUpOworICAgICAgICAgICAgZGVz
dFszXSA9IGE7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBkZXN0WzBdID0gcjsKKyAg
ICAgICAgICAgIGRlc3RbMV0gPSBnOworICAgICAgICAgICAgZGVzdFsyXSA9IGI7CisgICAgICAg
ICAgICBkZXN0WzNdID0gYTsKICAgICAgICAgfQorICAgICAgICBkZXN0ICs9IDQ7CisgICAgICAg
IHNyYyArPSA0OwogICAgIH0KIAotICAgIGF1dG8gaW1hZ2VTaXplID0gcGl4ZWxCdWZmZXItPnNp
emUoKTsKLSAgICBSZWZQdHI8Y2Fpcm9fc3VyZmFjZV90PiBpbWFnZVN1cmZhY2UgPSBhZG9wdFJl
ZihjYWlyb19pbWFnZV9zdXJmYWNlX2NyZWF0ZV9mb3JfZGF0YSgKLSAgICAgICAgcGl4ZWxCdWZm
ZXItPmJ5dGVzKCksIENBSVJPX0ZPUk1BVF9BUkdCMzIsIGltYWdlU2l6ZS53aWR0aCgpLCBpbWFn
ZVNpemUuaGVpZ2h0KCksIGltYWdlU2l6ZS53aWR0aCgpICogNCkpOwotCiAgICAgcmV0dXJuIE5h
dGl2ZUltYWdlOjpjcmVhdGUoV1RGTW92ZShpbWFnZVN1cmZhY2UpKTsKIH0KIAo=
</data>

          </attachment>
      

    </bug>

</bugzilla>