[Mesa-dev] [PATCH] nir: avoid segfault when ssa src not found
Jason Ekstrand
jason at jlekstrand.net
Sun Aug 21 14:40:04 UTC 2016
Seems reasonable. R-B
On Aug 21, 2016 1:32 AM, "Timothy Arceri" <timothy.arceri at collabora.com>
wrote:
> Without this the following line will segfault and we don't get to
> see the results of the validate_assert() above.
> ---
> src/compiler/nir/nir_validate.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_
> validate.c
> index d9801b5..9d1566c 100644
> --- a/src/compiler/nir/nir_validate.c
> +++ b/src/compiler/nir/nir_validate.c
> @@ -173,6 +173,9 @@ validate_ssa_src(nir_src *src, validate_state *state)
>
> validate_assert(state, entry);
>
> + if (!entry)
> + return;
> +
> ssa_def_validate_state *def_state = (ssa_def_validate_state
> *)entry->data;
>
> validate_assert(state, def_state->where_defined == state->impl &&
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160821/a6984ef5/attachment.html>
More information about the mesa-dev
mailing list