mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
glsl: propagate errors from *=, /=, +=, -= operators
Fixes compiler crash on:
void main()
{
gl_FragColor = a += 1;
}
(a is not declared anywhere)
Found with AFL++.
Fixes: d1fa69ed61 ("glsl: do not attempt assignment if operand type not parsed correctly")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12717>
This commit is contained in:
parent
0edbdc671f
commit
26302ccdc1
1 changed files with 1 additions and 0 deletions
|
|
@ -1703,6 +1703,7 @@ ast_expression::do_hir(exec_list *instructions,
|
|||
if ((op[0]->type == glsl_type::error_type ||
|
||||
op[1]->type == glsl_type::error_type)) {
|
||||
error_emitted = true;
|
||||
result = ir_rvalue::error_value(ctx);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue