Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Index out of bounds in lower/mod.rs #2568

Closed
wgslfuzz opened this issue Oct 19, 2023 · 0 comments · Fixed by #2570
Closed

Index out of bounds in lower/mod.rs #2568

wgslfuzz opened this issue Oct 19, 2023 · 0 comments · Fixed by #2570
Labels
area: front-end Input formats for conversion kind: bug Something isn't working lang: WGSL WebGPU shading language

Comments

@wgslfuzz
Copy link

On git commit 5b65f11 naga panics with the following backtrace when executing naga input.wgsl output.hlsl

thread 'main' panicked at src/front/wgsl/lower/mod.rs:1705:49:
index out of bounds: the len is 0 but the index is 0
stack backtrace:
   0: rust_begin_unwind
             at /rustc/030e4d382f1df30240408540f25cd1ccc8dbbf50/library/std/src/panicking.rs:619:5
   1: core::panicking::panic_fmt
             at /rustc/030e4d382f1df30240408540f25cd1ccc8dbbf50/library/core/src/panicking.rs:72:14
   2: core::panicking::panic_bounds_check
             at /rustc/030e4d382f1df30240408540f25cd1ccc8dbbf50/library/core/src/panicking.rs:180:5
   3: naga::front::wgsl::lower::Lowerer::expression_for_reference
   4: naga::front::wgsl::lower::Lowerer::expression
fn f() -> vec4<f32> {
    return bitcast<mat3x4<f32>>(0.0);
}
@teoxoy teoxoy added kind: bug Something isn't working lang: WGSL WebGPU shading language area: front-end Input formats for conversion labels Oct 19, 2023
@teoxoy teoxoy added this to the WGSL Specification V1 milestone Oct 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: front-end Input formats for conversion kind: bug Something isn't working lang: WGSL WebGPU shading language
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants