[PATCH] D129755: Thread safety analysis: Support copy-elided production of scoped capabilities through arbitrary calls
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 7 10:32:58 PDT 2022
aaronpuchert planned changes to this revision.
aaronpuchert added a comment.
In D129755#3843206 <https://reviews.llvm.org/D129755#3843206>, @aaronpuchert wrote:
> Presumably `Cursor` is some kind of alias to `VmoCursor`, as we don't look at base destructors yet. Since the code is not easily searchable for me, can you look up the annotations on `DiscardableVmosLock::Get`, the constructor of `Cursor`/`VmoCursor` being used here, `Cursor::lock_ref`, and `AssertHeld`?
Nevermind, I think I've found it <https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/zircon/kernel/vm/include/vm/vm_object.h>: `lock_ref` has `TA_RET_CAP(lock_)`, so `cursor.lock_ref()` translates to `cursor.lock_`. So we have that lock. The destructor `~VmoCursor()` has `TA_REQ(lock_)` referring to the same lock. So that looks like a bug, I think we're missing the substitution somehow. Need to look into it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129755/new/
https://reviews.llvm.org/D129755
More information about the cfe-commits
mailing list