Bug 228737 - Crash while reading WebGL drawing buffer if canvas image buffer allocation fails
Summary: Crash while reading WebGL drawing buffer if canvas image buffer allocation fails
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kimmo Kinnunen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-03 06:24 PDT by Kimmo Kinnunen
Modified: 2021-08-03 10:34 PDT (History)
12 users (show)

See Also:


Attachments
Patch (7.05 KB, patch)
2021-08-03 06:32 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmo Kinnunen 2021-08-03 06:24:37 PDT
Crash while reading WebGL drawing buffer if canvas image buffer allocation fails
Comment 1 Kimmo Kinnunen 2021-08-03 06:25:15 PDT
<rdar://81150042>
Comment 2 Kimmo Kinnunen 2021-08-03 06:32:31 PDT
Created attachment 434827 [details]
Patch
Comment 3 Brent Fulgham 2021-08-03 09:12:08 PDT
Comment on attachment 434827 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=434827&action=review

Looks good! r=me

> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:1221
> +            if (auto buffer = base.buffer()) {

Is a nullptr buffer something we should report in a log message or something? Or perhaps that allocation failure is logged elsewhere?
Comment 4 Kimmo Kinnunen 2021-08-03 10:26:51 PDT
(In reply to Brent Fulgham from comment #3)
> > Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:1221
> > +            if (auto buffer = base.buffer()) {
> 
> Is a nullptr buffer something we should report in a log message or
> something? Or perhaps that allocation failure is logged elsewhere?

Reported already in void HTMLCanvasElement::createImageBuffer() const
Comment 5 EWS 2021-08-03 10:34:55 PDT
Committed r280601 (240219@main): <https://commits.webkit.org/240219@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434827 [details].