[v1] glsl: missed error_emitted for do_assignment

Submitted by Sergii Romantsov on Sept. 14, 2018, 1:39 p.m.

Details

Message ID 1536932394-20283-1-git-send-email-sergii.romantsov@globallogic.com
State New
Series "glsl: missed error_emitted for do_assignment"
Headers show

Commit Message

Sergii Romantsov Sept. 14, 2018, 1:39 p.m.
During do_assignment a validation of rhs may fail.
Because of lack error_emitted an error_value may not be generated.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107547
Signed-off-by: Sergii Romantsov <sergii.romantsov@globallogic.com>
---
 src/compiler/glsl/ast_to_hir.cpp | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 5d3f10b..da1654b 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -1013,6 +1013,8 @@  do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state,
          mark_whole_array_access(lhs);
       }
    }
+   else
+      error_emitted = true;
 
    /* Most callers of do_assignment (assign, add_assign, pre_inc/dec,
     * but not post_inc) need the converted assigned value as an rvalue

Comments

Sergii Romantsov Sept. 14, 2018, 2:20 p.m.
Seems that patch is simplified version of already exist one:
https://patchwork.freedesktop.org/series/48256/

On Fri, Sep 14, 2018 at 4:39 PM, Sergii Romantsov <
sergii.romantsov@gmail.com> wrote:

> During do_assignment a validation of rhs may fail.
> Because of lack error_emitted an error_value may not be generated.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107547
> Signed-off-by: Sergii Romantsov <sergii.romantsov@globallogic.com>
> ---
>  src/compiler/glsl/ast_to_hir.cpp | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_
> hir.cpp
> index 5d3f10b..da1654b 100644
> --- a/src/compiler/glsl/ast_to_hir.cpp
> +++ b/src/compiler/glsl/ast_to_hir.cpp
> @@ -1013,6 +1013,8 @@ do_assignment(exec_list *instructions, struct
> _mesa_glsl_parse_state *state,
>           mark_whole_array_access(lhs);
>        }
>     }
> +   else
> +      error_emitted = true;
>
>     /* Most callers of do_assignment (assign, add_assign, pre_inc/dec,
>      * but not post_inc) need the converted assigned value as an rvalue
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>