[Mesa-dev] [PATCH 11/11] panfrost: Only take the fast paths on buffers aligned to block size

Emil Velikov emil.l.velikov at gmail.com
Thu May 9 14:55:41 UTC 2019


On Thu, 9 May 2019 at 07:36, Tomeu Vizoso <tomeu.vizoso at collabora.com> wrote:
>
> As the functions operate on 16-byte blocks.
>
> Fixes this Valgrind error:
>
> Invalid read of size 4
>    at 0x5857568: swizzle_bpp1_align16 (pan_swizzle.c:85)
>    by 0x585780F: panfrost_texture_swizzle (pan_swizzle.c:171)
>    by 0x584F587: panfrost_tile_texture (pan_resource.c:489)
>    by 0x584F641: panfrost_transfer_unmap (pan_resource.c:525)
>    by 0x587718D: u_transfer_helper_transfer_unmap (u_transfer_helper.c:516)
>    by 0x5875D85: pipe_transfer_unmap (u_inlines.h:515)
>    by 0x5875F13: u_default_texture_subdata (u_transfer.c:80)
>    by 0x53FFDC3: st_TexSubImage (st_cb_texture.c:1480)
>    by 0x54005BB: st_TexImage (st_cb_texture.c:1709)
>    by 0x5391353: teximage (teximage.c:3105)
>    by 0x5391353: teximage_err (teximage.c:3132)
>    by 0x5391B9B: _mesa_TexImage2D (teximage.c:3170)
>    by 0x5097A77: shared_dispatch_stub_183 (glapi_mapi_tmp.h:18833)
>  Address 0x1e94f1e8 is 0 bytes after a block of size 16 alloc'd
>    at 0x483F5C8: malloc (vg_replace_malloc.c:299)
>    by 0x584F47D: panfrost_transfer_map (pan_resource.c:467)
>    by 0x587694D: u_transfer_helper_transfer_map (u_transfer_helper.c:243)
>    by 0x5875EA7: u_default_texture_subdata (u_transfer.c:59)
>    by 0x53FFDC3: st_TexSubImage (st_cb_texture.c:1480)
>    by 0x54005BB: st_TexImage (st_cb_texture.c:1709)
>    by 0x5391353: teximage (teximage.c:3105)
>    by 0x5391353: teximage_err (teximage.c:3132)
>    by 0x5391B9B: _mesa_TexImage2D (teximage.c:3170)
>    by 0x5097A77: shared_dispatch_stub_183 (glapi_mapi_tmp.h:18833)
>    by 0x4DA8AB: glu::CallLogWrapper::glTexImage2D(unsigned int, int, int, int, int, int, unsigned int, unsigned int, void const*) (in /home/tomeu/deqp-build/modules/gles2/deqp-gles2)
>
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>

There is no clear commit for "fixes" - so I'd add a stable tag here.

CC: 19.1 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

HTH
-Emil


More information about the mesa-dev mailing list