mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
Currently program errors might result on instructions that use ctx->error_instr as src. In case we hit YYABORT while parsing another part of the HLSL source, we have to make sure that the block that contains the instruction is properly cleaned up, or we might hit the vkd3d:590273:err:hlsl_free_instr Failed assertion: list_empty(&node->uses) assertion when hlsl_ctx_cleanup() is called after the YYABORT. Consider the following shader: float4 main() : sv_target { // Statement A int p = foo; // initializer argument is ERROR. // Statement B undeclared_fun(); // triggers YYABORT. } Statement A will src the ctx->error_instr because of the undeclared identifier and Statement B will trigger an YYABORT because of the undeclared function.