[Mesa-dev] [Mesa-stable] [PATCH] radv: Use build ID if available for cache UUID.

Emil Velikov emil.l.velikov at gmail.com
Thu Sep 20 10:24:58 UTC 2018


Hi Bas,

Some food for thought.

On 16 September 2018 at 01:58, Bas Nieuwenhuizen
<bas at basnieuwenhuizen.nl> wrote:
> To get an useful UUID for systems that have a non-useful mtime
> for the binaries.
>
> I started using using SHA1 to ensure we get reasonable mixing
> in the various possibilities and the various build id lengths.
>
General question: why are we mixing the two?

Is it about dl* API availability or LLVM missing --build-id=sha1?

The API has been around for ages on any platform (and more) that has HW support.
All the BSDs, Linux (glibc and musl), Android, Solaris plus likely others.

If the question is about LLVM - guess we can have a #if HAVE_LLVM >
LLVM_VERSION_HAVING_BUILD_ID to select the correct one.
This way we will have consistency and less diverging code flow.

As-is, when LLVM is build w/o --build-id=sha1
build_id_find_nhdr_for_addr() will fail.
Aka we're missing the uniqueness which LLVM brings.

> +       _mesa_sha1_update(&ctx, &ptr_size, sizeof(ptr_size));
This band-aid can go now ;-)

HTH
Emil


More information about the mesa-dev mailing list