[Mesa-dev] [PATCH 1/2] radv: place pointer length into cache uuid

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Mon Aug 20 22:10:44 UTC 2018


On Mon, Aug 20, 2018 at 11:32 PM, Grazvydas Ignotas <notasas at gmail.com> wrote:
> Thanks to reproducible builds, binary file timestamps may be identical
> for both 32bit and 64bit packages when built from the same source.
> This means radv will use the same cache for both 32 and 64 bit
> processes, which leads to crashes.
>
> Conveniently there is a spare byte in cache_uuid, let's place the
> pointer size there.
>
> Fixes: f4e499ec79 "radv: add initial non-conformant radv vulkan driver"
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107601
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105904

Maybe an explicit

CC: 18.1 18.2 <mesa-stable at lists.freedesktop.org>

?

> ---
>  src/amd/vulkan/radv_device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
> index cc88abb57a8..79dbbd886d5 100644
> --- a/src/amd/vulkan/radv_device.c
> +++ b/src/amd/vulkan/radv_device.c
> @@ -58,11 +58,11 @@ radv_device_get_cache_uuid(enum radeon_family family, void *uuid)
>                 return -1;
>
>         memcpy(uuid, &mesa_timestamp, 4);
>         memcpy((char*)uuid + 4, &llvm_timestamp, 4);
>         memcpy((char*)uuid + 8, &f, 2);
> -       snprintf((char*)uuid + 10, VK_UUID_SIZE - 10, "radv");
> +       snprintf((char*)uuid + 10, VK_UUID_SIZE - 10, "radv%zd", sizeof(void *));
>         return 0;
>  }
>
>  static void
>  radv_get_driver_uuid(void *uuid)
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list