On 3/4/25 1:21 AM, Marco Elver wrote:
Due to the scoped cleanup helpers used for lock guards wrapping acquire/release around their own constructors/destructors that store pointers to the passed locks in a separate struct, we currently cannot accurately annotate *destructors* which lock was released. While it's possible to annotate the constructor to say which lock was acquired, that alone would result in false positives claiming the lock was not released on function return.
It may be worth mentioning that Clang's thread-safety analyzer not supporting alias analysis plays a role here. Anyway: Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>