Naga constant evaluation can use too much memory #6872
Labels
area: validation
Issues related to validation, diagnostics, and error handling
naga
Shader Translator
The OSS Fuzz project found this test case, that causes Naga to use more than 2560MiB of memory:
This is slightly surprising, because that should only be a 4 * ~50M = ~200MiB value. I'm pretty sure I have that limit right.
OSS Fuzz claims we fixed this, but I doubt it.
I feel like we should impose some sort of reasonable limit on these things, but addressing these problems case-by-case would take forever. Ideally, the architecture would put obvious overall bounds on the amount of memory that constant evaluation might consume - say, by monitoring the size of the expression arena, in a way that counts heap-allocated memory owned by arena elements.
The text was updated successfully, but these errors were encountered: