qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Your clang TSA patches


From: Marc-André Lureau
Subject: Re: Your clang TSA patches
Date: Tue, 9 May 2023 11:00:57 +0400

Hi Stefan

On Mon, May 8, 2023 at 6:54 PM Stefan Hajnoczi <stefanha@gmail.com> wrote:
Hi Marc-André,
clang's Thread Safety Analysis is being used more in the QEMU block
layer and a few limitations have been hit:
1. Mutexes that are struct fields are not supported (only global mutexes work).
2. Analysis does not extend across function pointers. See
GRAPH_RDLOCK_PTR for a workaround that is currently used.

(There was a third limitation that I don't remember. Maybe Kevin remembers.)

I heard you had clang or LLVM patches in that past that improve TSA.
Did your patches address these things? Any idea how hard it is to fix
these limitations?


I don't remember much about that work, I didn't spend that much time on it, and it was 5y ago already!

My WIP branch is still available: https://github.com/elmarco/clang/commits/qemu-ta

it seems I was trying to modify clang to support TSA annotations on typedef and function pointers, and warn on unmatching. I have no idea if this is still relevant. I remember dropping the effort at that time because of lack of interest or help in both projects.

--
Marc-André Lureau

reply via email to

[Prev in Thread] Current Thread [Next in Thread]