All recursion in the WGSL front end should be audited #6964
Labels
area: naga front-end
lang: WGSL
WebGPU Shading Language
naga
Shader Translator
type: enhancement
New feature or request
The fuzzers are having a good time making the WGSL front end exhaust it's stack. We've had #5757 for expressions, and #4352 for statements. I think there is also recursion in type parsing. Waiting for the fuzzers to find everything is dorky; we should just think about the grammar, identify everywhere that recursion is used, and slap limits on all of them.
It's true that the WGSL spec doesn't impose any limits on this nesting, as Erich pointed out in his comment: #6885 (review) But the fact is that Naga exhausts its stack with unbounded nesting; our architecture doesn't parse these things successfully anyway. So we need to treat this as an uncategorized error:
The text was updated successfully, but these errors were encountered: