[Mesa-dev] [PATCH] mesa: ensure that variable is initialized
Dylan Baker
dylan at pnwbakers.com
Mon Apr 2 23:18:48 UTC 2018
locally I've added:
Fixes: 16f6634e7fb5ada308e55b852cd49251e7f3f8b1
("mesa/program: Link SPIR-V shaders using the SPIR-V code-path")
Quoting Dylan Baker (2018-04-02 15:36:01)
> Otherwise this variable will only be set if there are spirv shaders
> present, but it's used regardless, resulting in undefined behavior.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105820
> CC: Alejandro PiƱeiro <apinheiro at igalia.com>
> CC: Mark Janes <mark.a.janes at intel.com>
> Signed-off-by: Dylan Baker <dylan.c.baker at intel.com>
> ---
> src/mesa/program/ir_to_mesa.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
> index 49ef5ea52d8..60fb24bf664 100644
> --- a/src/mesa/program/ir_to_mesa.cpp
> +++ b/src/mesa/program/ir_to_mesa.cpp
> @@ -3126,7 +3126,7 @@ void
> _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
> {
> unsigned int i;
> - bool spirv;
> + bool spirv = false;
>
> _mesa_clear_shader_program_data(ctx, prog);
>
> --
> 2.16.3
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180402/14b80e81/attachment.sig>
More information about the mesa-dev
mailing list