[Mesa-dev] [PATCH v2 1/4] softpipe: Add assert verifying successful pipe_transfer_map
This failure mode is a bit tricky to debug and manifests itself later as a null pointer dereference, for which finding the origin is needlessly tricky. Signed-off-by: Robert Foss --- Changes since v1: - Patch added src/gallium/drivers/softpipe/sp_tile_cache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index 351736ee421..211cc5ef4b0 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -209,6 +209,7 @@ sp_tile_cache_set_surface(struct softpipe_tile_cache *tc, PIPE_TRANSFER_UNSYNCHRONIZED, 0, 0, ps->width, ps->height, &tc->transfer[i]); +assert(tc->transfer_map[i]); } } else { -- 2.17.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v2 1/4] softpipe: Add assert verifying successful pipe_transfer_map
On 17 July 2018 at 11:32, Robert Foss wrote: > This failure mode is a bit tricky to debug and manifests itself > later as a null pointer dereference, for which finding the origin > is needlessly tricky. > > Signed-off-by: Robert Foss Reviewed-by: Emil Velikov Ever so mildly related: Android-x86 were the first ones hacking away the auth check in core DRM. Was not expecting that Mauro would try anything w/o it. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v2 1/4] softpipe: Add assert verifying successful pipe_transfer_map
On 07/17/2018 04:32 AM, Robert Foss wrote: This failure mode is a bit tricky to debug and manifests itself later as a null pointer dereference, for which finding the origin is needlessly tricky. Signed-off-by: Robert Foss --- Changes since v1: - Patch added src/gallium/drivers/softpipe/sp_tile_cache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index 351736ee421..211cc5ef4b0 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -209,6 +209,7 @@ sp_tile_cache_set_surface(struct softpipe_tile_cache *tc, PIPE_TRANSFER_UNSYNCHRONIZED, 0, 0, ps->width, ps->height, &tc->transfer[i]); +assert(tc->transfer_map[i]); } } else { Looks OK to me. Reviewed-by: Brian Paul ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v2 1/4] softpipe: Add assert verifying successful pipe_transfer_map
Thanks Brian! On 2018-07-17 16:18, Brian Paul wrote: On 07/17/2018 04:32 AM, Robert Foss wrote: This failure mode is a bit tricky to debug and manifests itself later as a null pointer dereference, for which finding the origin is needlessly tricky. Signed-off-by: Robert Foss --- Changes since v1: - Patch added src/gallium/drivers/softpipe/sp_tile_cache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index 351736ee421..211cc5ef4b0 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -209,6 +209,7 @@ sp_tile_cache_set_surface(struct softpipe_tile_cache *tc, PIPE_TRANSFER_UNSYNCHRONIZED, 0, 0, ps->width, ps->height, &tc->transfer[i]); + assert(tc->transfer_map[i]); } } else { Looks OK to me. Reviewed-by: Brian Paul ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev