Title: [290328] trunk/Source/WebKit
Revision
290328
Author
[email protected]
Date
2022-02-22 12:45:09 -0800 (Tue, 22 Feb 2022)

Log Message

Fix GPUP WebGL generator script wrt uninitialised sized span
https://bugs.webkit.org/show_bug.cgi?id=235889
<rdar://problem/88567612>

Reviewed by Chris Dumez.

Even though we check if the synchronous message was received successfully before using it,
if we didn't check then we might have a problem with pointing to uninitialized memory, which we then wouldn't use for anything.
To fix this hypothetical problem, I start out by pointing to initialized memory.

* WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:
(WebKit::RemoteGraphicsContextGLProxy::getShaderPrecisionFormat):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (290327 => 290328)


--- trunk/Source/WebKit/ChangeLog	2022-02-22 19:53:09 UTC (rev 290327)
+++ trunk/Source/WebKit/ChangeLog	2022-02-22 20:45:09 UTC (rev 290328)
@@ -1,3 +1,18 @@
+2022-02-22  Alex Christensen  <[email protected]>
+
+        Fix GPUP WebGL generator script wrt uninitialised sized span
+        https://bugs.webkit.org/show_bug.cgi?id=235889
+        <rdar://problem/88567612>
+
+        Reviewed by Chris Dumez.
+
+        Even though we check if the synchronous message was received successfully before using it,
+        if we didn't check then we might have a problem with pointing to uninitialized memory, which we then wouldn't use for anything.
+        To fix this hypothetical problem, I start out by pointing to initialized memory.
+
+        * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:
+        (WebKit::RemoteGraphicsContextGLProxy::getShaderPrecisionFormat):
+
 2022-02-22  J Pascoe  <[email protected]>
 
         [WebAuthn] Fix lifetime issue on iOS

Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp (290327 => 290328)


--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp	2022-02-22 19:53:09 UTC (rev 290327)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp	2022-02-22 20:45:09 UTC (rev 290328)
@@ -686,7 +686,8 @@
 
 void RemoteGraphicsContextGLProxy::getShaderPrecisionFormat(GCGLenum shaderType, GCGLenum precisionType, GCGLSpan<GCGLint, 2> range, GCGLint* precision)
 {
-    IPC::ArrayReference<int32_t, 2> rangeReply { { } };
+    constexpr std::array<int32_t, 2> emptyRangeReply { 0, 0 };
+    IPC::ArrayReference<int32_t, 2> rangeReply { emptyRangeReply };
     int32_t precisionReply = { };
     if (!isContextLost()) {
         auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::GetShaderPrecisionFormat(shaderType, precisionType), Messages::RemoteGraphicsContextGL::GetShaderPrecisionFormat::Reply(rangeReply, precisionReply));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to