[PATCH] D129755: Thread safety analysis: Support copy-elided production of scoped capabilities through arbitrary calls
Gulfem Savrun Yeniceri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 7 16:40:33 PDT 2022
gulfem added a comment.
In D129755#3844059 <https://reviews.llvm.org/D129755#3844059>, @aaronpuchert wrote:
> In D129755#3843144 <https://reviews.llvm.org/D129755#3843144>, @gulfem wrote:
>
>> We also started seeing `-Wthread-safety-precise` error in our Fuchsia code.
>> https://luci-milo.appspot.com/ui/p/fuchsia/builders/ci/clang_toolchain.ci.core.x64-release/b8800959115965408001/overview
>> I'm trying to verify with our team whether it is a false positive, but I just wanted to give you heads up!
>
> This was a genuine bug which I believe to be fixed now (see the comments below). Thanks for the report!
>
> I'd appreciate if you could test this, but it's not necessary as I could reproduce the bug and the test seems to show it fixed.
I verified that it fixes the following error in our `zircon` kernel, and thanks for the fix!
[89054/268252] CXX kernel_x64/obj/zircon/kernel/vm/vm.vm_cow_pages.cc.o
FAILED: kernel_x64/obj/zircon/kernel/vm/vm.vm_cow_pages.cc.o
../../../recipe_cleanup/clang72pd81kv/bin/clang++ -MD -MF kernel_x64/obj/zircon/kernel/vm/vm.vm_cow_pages.cc.o.d -o kernel_x64/obj/zircon/kernel/vm/vm.vm_cow_pages.cc.o -D_LIBCPP_DISABLE_VISIBILITY...
../../zircon/kernel/vm/vm_cow_pages.cc:6400:3: error: calling function '~VmoCursor' requires holding mutex 'lock_' exclusively [-Werror,-Wthread-safety-precise]
}
^
../../zircon/kernel/vm/vm_cow_pages.cc:6400:3: note: found near match 'cursor.lock_'
../../zircon/kernel/vm/vm_cow_pages.cc:6483:10: error: calling function '~VmoCursor' requires holding mutex 'lock_' exclusively [-Werror,-Wthread-safety-precise]
return total_pages_discarded;
^
../../zircon/kernel/vm/vm_cow_pages.cc:6483:10: note: found near match 'cursor.lock_'
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