Title: [247676] trunk
- Revision
- 247676
- Author
- [email protected]
- Date
- 2019-07-21 11:35:50 -0700 (Sun, 21 Jul 2019)
Log Message
[WHLSL] Checker needs to setError() when a property access node can't commit its base type
https://bugs.webkit.org/show_bug.cgi?id=199978
Reviewed by Dean Jackson.
Source/WebCore:
Test: webgpu/whlsl/null-array-property-access.html
* Modules/webgpu/WHLSL/WHLSLChecker.cpp:
(WebCore::WHLSL::Checker::finishVisiting):
LayoutTests:
* webgpu/whlsl/null-array-property-access-expected.txt: Added.
* webgpu/whlsl/null-array-property-access.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (247675 => 247676)
--- trunk/LayoutTests/ChangeLog 2019-07-21 18:31:53 UTC (rev 247675)
+++ trunk/LayoutTests/ChangeLog 2019-07-21 18:35:50 UTC (rev 247676)
@@ -1,5 +1,15 @@
2019-07-21 Saam Barati <[email protected]>
+ [WHLSL] Checker needs to setError() when a property access node can't commit its base type
+ https://bugs.webkit.org/show_bug.cgi?id=199978
+
+ Reviewed by Dean Jackson.
+
+ * webgpu/whlsl/null-array-property-access-expected.txt: Added.
+ * webgpu/whlsl/null-array-property-access.html: Added.
+
+2019-07-21 Saam Barati <[email protected]>
+
[WHLSL] Return the zero-value enum in the enum-from-integer constructor when the integer is not a valid enum value
https://bugs.webkit.org/show_bug.cgi?id=199853
Added: trunk/LayoutTests/webgpu/whlsl/null-array-property-access-expected.txt (0 => 247676)
--- trunk/LayoutTests/webgpu/whlsl/null-array-property-access-expected.txt (rev 0)
+++ trunk/LayoutTests/webgpu/whlsl/null-array-property-access-expected.txt 2019-07-21 18:35:50 UTC (rev 247676)
@@ -0,0 +1,8 @@
+
+PASS storeNullArrayRef
+PASS loadNullArrayRef
+PASS nullNamedAccess
+PASS nullNamedAccess2
+PASS nullNamedAccessSink
+PASS nullNamedAccessSink2
+
Added: trunk/LayoutTests/webgpu/whlsl/null-array-property-access.html (0 => 247676)
--- trunk/LayoutTests/webgpu/whlsl/null-array-property-access.html (rev 0)
+++ trunk/LayoutTests/webgpu/whlsl/null-array-property-access.html 2019-07-21 18:35:50 UTC (rev 247676)
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+<meta charset=utf-8>
+<meta name="timeout" content="long">
+<title>load/store to null.</title>
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script>
+const whlslTests = {};
+
+whlslTests.storeNullArrayRef = async () => {
+ await checkFail(
+ `
+ void foo() { null[0] = 42; }
+ `);
+}
+
+whlslTests.loadNullArrayRef = async () => {
+ await checkFail(
+ `
+ void sink(thread int* x) { }
+ void foo() { sink(null[0]); }
+ `);
+}
+
+whlslTests.nullNamedAccess = async () => {
+ await checkFail(
+ `
+ void foo() { null->x; }
+ `);
+}
+
+whlslTests.nullNamedAccess2 = async () => {
+ await checkFail(
+ `
+ void foo() { null.x; }
+ `);
+}
+
+whlslTests.nullNamedAccessSink = async () => {
+ await checkFail(
+ `
+ void sink(int x) { }
+ void foo() { sink(null->x); }
+ `);
+}
+
+whlslTests.nullNamedAccessSink2 = async () => {
+ await checkFail(
+ `
+ void sink(int x) { }
+ void foo() { sink(null.x); }
+ `);
+}
+
+runTests(whlslTests);
+</script>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (247675 => 247676)
--- trunk/Source/WebCore/ChangeLog 2019-07-21 18:31:53 UTC (rev 247675)
+++ trunk/Source/WebCore/ChangeLog 2019-07-21 18:35:50 UTC (rev 247676)
@@ -1,5 +1,17 @@
2019-07-21 Saam Barati <[email protected]>
+ [WHLSL] Checker needs to setError() when a property access node can't commit its base type
+ https://bugs.webkit.org/show_bug.cgi?id=199978
+
+ Reviewed by Dean Jackson.
+
+ Test: webgpu/whlsl/null-array-property-access.html
+
+ * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
+ (WebCore::WHLSL::Checker::finishVisiting):
+
+2019-07-21 Saam Barati <[email protected]>
+
[WHLSL] Return the zero-value enum in the enum-from-integer constructor when the integer is not a valid enum value
https://bugs.webkit.org/show_bug.cgi?id=199853
Modified: trunk/Source/WebCore/Modules/webgpu/WHLSL/WHLSLChecker.cpp (247675 => 247676)
--- trunk/Source/WebCore/Modules/webgpu/WHLSL/WHLSLChecker.cpp 2019-07-21 18:31:53 UTC (rev 247675)
+++ trunk/Source/WebCore/Modules/webgpu/WHLSL/WHLSLChecker.cpp 2019-07-21 18:35:50 UTC (rev 247676)
@@ -949,8 +949,10 @@
if (!baseInfo)
return;
auto baseUnnamedType = commit(baseInfo->resolvingType);
- if (!baseUnnamedType)
+ if (!baseUnnamedType) {
+ setError();
return;
+ }
AST::FunctionDeclaration* getterFunction = nullptr;
AST::UnnamedType* getterReturnType = nullptr;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes