Title: [292743] trunk/Source/ThirdParty/ANGLE
Revision
292743
Author
kpidding...@apple.com
Date
2022-04-11 17:10:17 -0700 (Mon, 11 Apr 2022)

Log Message

This WebGL example crashes
https://bugs.webkit.org/show_bug.cgi?id=238953

Null-check subnodes while performing a deep copy for
loops, and branches. These nodes can be null in some cases

Reviewed by Dean Jackson.

* src/compiler/translator/IntermNode.cpp:
(sh::TIntermBranch::TIntermBranch):
(sh::TIntermLoop::TIntermLoop):

Modified Paths

Diff

Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (292742 => 292743)


--- trunk/Source/ThirdParty/ANGLE/ChangeLog	2022-04-12 00:07:17 UTC (rev 292742)
+++ trunk/Source/ThirdParty/ANGLE/ChangeLog	2022-04-12 00:10:17 UTC (rev 292743)
@@ -1,3 +1,17 @@
+2022-04-11  Kyle Piddington  <kpidding...@apple.com>
+
+        This WebGL example crashes
+        https://bugs.webkit.org/show_bug.cgi?id=238953
+        
+        Null-check subnodes while performing a deep copy for
+        loops, and branches. These nodes can be null in some cases
+
+        Reviewed by Dean Jackson.
+
+        * src/compiler/translator/IntermNode.cpp:
+        (sh::TIntermBranch::TIntermBranch):
+        (sh::TIntermLoop::TIntermLoop):
+
 2022-04-08  Elliott Williams  <e...@apple.com>
 
         [Xcode] Avoid targeting 32-bit iOS and Mac architectures

Modified: trunk/Source/ThirdParty/ANGLE/src/compiler/translator/IntermNode.cpp (292742 => 292743)


--- trunk/Source/ThirdParty/ANGLE/src/compiler/translator/IntermNode.cpp	2022-04-12 00:07:17 UTC (rev 292742)
+++ trunk/Source/ThirdParty/ANGLE/src/compiler/translator/IntermNode.cpp	2022-04-12 00:10:17 UTC (rev 292743)
@@ -279,7 +279,7 @@
 }
 
 TIntermBranch::TIntermBranch(const TIntermBranch &node)
-    : TIntermBranch(node.mFlowOp, node.mExpression->deepCopy())
+    : TIntermBranch(node.mFlowOp, node.mExpression ? node.mExpression->deepCopy() : nullptr)
 {}
 
 size_t TIntermBranch::getChildCount() const
@@ -1601,10 +1601,10 @@
 
 TIntermLoop::TIntermLoop(const TIntermLoop &node)
     : TIntermLoop(node.mType,
-                  node.mInit->deepCopy(),
-                  node.mCond->deepCopy(),
-                  node.mExpr->deepCopy(),
-                  node.mBody->deepCopy())
+                  node.mInit ? node.mInit->deepCopy() : nullptr,
+                  node.mCond ? node.mCond->deepCopy() : nullptr,
+                  node.mExpr ? node.mExpr->deepCopy() : nullptr,
+                  node.mBody ? node.mBody->deepCopy() : nullptr)
 {}
 
 TIntermIfElse::TIntermIfElse(TIntermTyped *cond, TIntermBlock *trueB, TIntermBlock *falseB)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to