Page MenuHomePhabricator

ajtowns (Anthony Towns)
User

Projects

User does not belong to any projects.

User Details

User Since
Wed, Sep 16, 6:20 PM (5 d, 17 h)

Recent Activity

Thu, Sep 17

ajtowns added a comment to D87629: Thread safety analysis: Improve documentation for ASSERT_CAPABILITY.

Not sure the try { AssertHeld } catch (...) { a = 0; } example reveals very much: it seems like thread safety annotations aren't checked within a catch block at all?
void g() { try { thrower(); } catch (...) { i = 5; } i = 6; }
gives me warnings for ... i=6 but not i=5 ?

It's not that we don't check catch-blocks, but rather that the Clang CFG is incomplete:
There is no edge from the thrower call to B2 or B3. We can turn on "exception handling edges" from non-noexcept calls to catch blocks, but that's a bigger change and it would affect other warnings as well. There are also performance problems. (https://bugs.llvm.org/show_bug.cgi?id=43311)

Thu, Sep 17, 3:21 PM · Restricted Project

Wed, Sep 16

ajtowns added a comment to D87629: Thread safety analysis: Improve documentation for ASSERT_CAPABILITY.

(The existing LockAssertion class that the change removed looks like it should use ASSERT_CAPABILITY instead—please don't use ACQUIRE when the capability is assumed to be held previously.)

Wed, Sep 16, 7:14 PM · Restricted Project