Bug 198775 - [WHLSL] Code that accesses an undefined variable crashes
Summary: [WHLSL] Code that accesses an undefined variable crashes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P1 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-11 18:09 PDT by Saam Barati
Modified: 2019-06-21 15:16 PDT (History)
8 users (show)

See Also:


Attachments
patch (7.26 KB, patch)
2019-06-20 15:32 PDT, Saam Barati
mmaxfield: review+
Details | Formatted Diff | Diff
patch for landing (8.15 KB, patch)
2019-06-21 14:31 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2019-06-11 18:09:41 PDT
e.g:
```
vertex float4 vertexShader(float4 position : attribute(0), float i : attribute(1)) : SV_Position {
    return position;
}

fragment float4 fragmentShader(float4 position : SV_Position, constant float[] theBuffer : register(b0)) : SV_Target 0 {
    //float x;
    return float4(x, x, x, 1.0);
}

```
Comment 1 Saam Barati 2019-06-11 18:09:52 PDT
Crashes in the Checker
Comment 2 Saam Barati 2019-06-20 14:02:02 PDT
working on this next
Comment 3 Saam Barati 2019-06-20 15:32:18 PDT
Created attachment 372593 [details]
patch
Comment 4 Myles C. Maxfield 2019-06-21 09:34:24 PDT
Comment on attachment 372593 [details]
patch

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

> LayoutTests/webgpu/whlsl-use-undefined-variable.html:18
> +async function start() {

Where are the -expected.txts?
Comment 5 Saam Barati 2019-06-21 11:41:36 PDT
Comment on attachment 372593 [details]
patch

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

> LayoutTests/ChangeLog:11
> +        Myles mostly fixed this in r246631 when he made NameResolver propagate
> +        its error to its parent NameResolver. However, there was still one bug
> +        where we ended up calling setError twice for an if statement. This patch
> +        fixes that and adds tests.

OOPS, This should go in WebCore's changelog
Comment 6 Saam Barati 2019-06-21 14:31:00 PDT
Created attachment 372651 [details]
patch for landing
Comment 7 WebKit Commit Bot 2019-06-21 15:15:03 PDT
Comment on attachment 372651 [details]
patch for landing

Clearing flags on attachment: 372651

Committed r246700: <https://trac.webkit.org/changeset/246700>
Comment 8 WebKit Commit Bot 2019-06-21 15:15:05 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2019-06-21 15:16:34 PDT
<rdar://problem/52004615>