KhronosGroup / glslang

Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
Other
2.9k stars 815 forks source link

Increase the TIntermediate::usedIo array #3586

Closed arcady-lunarg closed 2 months ago

arcady-lunarg commented 2 months ago

In 0bbec2e8f, the code started using usedIo[4], however it never increased the size of the array to make that index actually valid.

arcady-lunarg commented 2 months ago

cc: @janharaldfredriksen-arm

janharaldfredriksen-arm commented 2 months ago

ouch. This looks like it works as a quickfix. Is it worth adding some assertions somewhere that can trap this kind of thing? The hardcoded indices could be prone to issues like this, but the number of storage classes don't change very often so perhaps fixing that isn't worth the effort.