Page MenuHomePhabricator

aaronpuchert (Aaron Puchert)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 12 2018, 4:43 PM (131 w, 4 d)

Recent Activity

Dec 14 2020

aaronpuchert added inline comments to D68845: Don't emit unwanted constructor calls in co_return statements.
Dec 14 2020, 10:51 AM · Restricted Project

Dec 9 2020

aaronpuchert added a comment to D92886: [Sema] Warn about unused functions even when they're inline.

Non-static inline functions in C have confusing semantics.

I'm not terribly familiar with C, but judging from C11 6.7.4 it seems that C is a bit more permissive, but then says that certain things are implementation-defined. Whereas in C++ it's forbidden by the one-definition rule that an inline function has another external definition, it's allowed in C but implementation-defined which variant is called.

So if you do non-static inline functions like you'd do them in C++, I think you should be fine. But perhaps I'm missing something, in that case feel free to give me a pointer.

Dec 9 2020, 2:04 PM · Restricted Project
aaronpuchert added a comment to D92886: [Sema] Warn about unused functions even when they're inline.

I agree with your reasoning, but in practice I still see a lot of people using static inline for functions (especially function templates) in .h files.

That's also what I was seeing, and then I wondered why our warnings don't catch this.

Dec 9 2020, 10:39 AM · Restricted Project

Dec 8 2020

aaronpuchert requested review of D92886: [Sema] Warn about unused functions even when they're inline.
Dec 8 2020, 2:46 PM · Restricted Project

Nov 28 2020

aaronpuchert added a comment to D86308: [CMake][compiler-rt][libunwind] Compile assembly files as ASM not C, unify workarounds.
Nov 28 2020, 9:23 AM · Restricted Project, Restricted Project, Restricted Project
aaronpuchert updated subscribers of D86308: [CMake][compiler-rt][libunwind] Compile assembly files as ASM not C, unify workarounds.

@tstellar, can we have this in 11.0.1? I've already ported it back in openSUSE because we were having problems with the CMake 3.19 update.

Nov 28 2020, 8:50 AM · Restricted Project, Restricted Project, Restricted Project

Nov 23 2020

aaronpuchert added a comment to D91898: [attributes] Add a facility for defining and enforcing a Trusted Computing Base..

Thread safety attributes want callers of a function to have the same attribute, while this change wants callees to have the same attribute. So the attributes propagate in different directions.

Nov 23 2020, 9:22 AM · Restricted Project

Nov 22 2020

aaronpuchert committed rG1a009296a4e9: Build reproducible tarballs for releases (authored by aaronpuchert).
Build reproducible tarballs for releases
Nov 22 2020, 11:52 AM
aaronpuchert committed rG825f80e111f2: [Sema] Introduce function reference conversion, NFC (authored by aaronpuchert).
[Sema] Introduce function reference conversion, NFC
Nov 22 2020, 11:52 AM
aaronpuchert closed D91494: Build reproducible tarballs for releases.
Nov 22 2020, 11:52 AM · Restricted Project
aaronpuchert closed D67112: [Sema] Introduce function reference conversion, NFC.
Nov 22 2020, 11:52 AM · Restricted Project

Nov 17 2020

aaronpuchert added a comment to D67112: [Sema] Introduce function reference conversion, NFC.

Looks fine as far as it goes, but it looks like we're also missing a cast in function pointer initialization via function conversion:
[...]

|-VarDecl 0x105143e8 <line:2:1, col:15> col:8 p 'void (*)()' cinit
| `-ImplicitCastExpr 0x10514498 <col:15> 'void (*)() noexcept' <FunctionToPointerDecay>
|   `-DeclRefExpr 0x10514450 <col:15> 'void () noexcept' lvalue Function 0x10514240 'f' 'void () noexcept'

It seems to depend on the standard, with -std=c++17:

Nov 17 2020, 3:34 PM · Restricted Project

Nov 16 2020

aaronpuchert added a comment to D67112: [Sema] Introduce function reference conversion, NFC.

Ping.

Nov 16 2020, 12:54 PM · Restricted Project
aaronpuchert added a comment to D91494: Build reproducible tarballs for releases.

I kind of liked that the script always downloads from github and doesn't depend on the state of my local repro.

Nov 16 2020, 6:49 AM · Restricted Project

Nov 15 2020

aaronpuchert added a comment to D90123: [Sema] Improve notes for value category mismatch in overloading.

Fixed the spelling issue in rGdea31f135ceae6e860e6301f9bb66d3b3adb1357.

Nov 15 2020, 9:07 AM · Restricted Project
aaronpuchert committed rGdea31f135cea: Consistent spelling in diagnostics: {l,r}value instead of {l,r}-value (authored by aaronpuchert).
Consistent spelling in diagnostics: {l,r}value instead of {l,r}-value
Nov 15 2020, 9:06 AM
aaronpuchert committed rG6f84779674a9: [Sema] Improve notes for value category mismatch in overloading (authored by aaronpuchert).
[Sema] Improve notes for value category mismatch in overloading
Nov 15 2020, 9:06 AM
aaronpuchert closed D90123: [Sema] Improve notes for value category mismatch in overloading.
Nov 15 2020, 9:06 AM · Restricted Project
aaronpuchert added inline comments to D90123: [Sema] Improve notes for value category mismatch in overloading.
Nov 15 2020, 7:54 AM · Restricted Project
aaronpuchert requested review of D91494: Build reproducible tarballs for releases.
Nov 15 2020, 7:02 AM · Restricted Project
aaronpuchert updated the diff for D68845: Don't emit unwanted constructor calls in co_return statements.

Rebase and add a comment about the limitations of this implementation.

Nov 15 2020, 6:28 AM · Restricted Project

Nov 3 2020

aaronpuchert planned changes to D87194: Thread safety analysis: Use access specifiers to decide about scope.

That's a good point, while mu_ is public, params is a local variable.

Nov 3 2020, 12:32 PM · Restricted Project

Nov 2 2020

aaronpuchert updated subscribers of D87194: Thread safety analysis: Use access specifiers to decide about scope.

@rupprecht, maybe you can try it again?

Nov 2 2020, 1:34 PM · Restricted Project
aaronpuchert updated the diff for D87194: Thread safety analysis: Use access specifiers to decide about scope.

Rebased on D84604, included static members, and addressed review comments.

Nov 2 2020, 1:31 PM · Restricted Project
aaronpuchert added inline comments to D87194: Thread safety analysis: Use access specifiers to decide about scope.
Nov 2 2020, 1:30 PM · Restricted Project

Oct 30 2020

aaronpuchert added a comment to D88295: [Sema] Fix volatile check when test if a return object can be implicitly move.

... where X has a volatile copy constructor and a volatile move constructor, I think we should produce the warning suggesting use of std::move.

If I read this correctly, we'd have a false negative with this patch, which is probably Ok given that this is an odd case.

Oct 30 2020, 3:36 PM · Restricted Project
aaronpuchert added a comment to D88295: [Sema] Fix volatile check when test if a return object can be implicitly move.

The other is whether implicitly move in a co_return statement. In that case, I think the use of CES_AsIfByStdMove is a mistake, and we should be using CES_Default there.

Oct 30 2020, 1:11 PM · Restricted Project
aaronpuchert planned changes to D87194: Thread safety analysis: Use access specifiers to decide about scope.

Need to rebase this on top of D84604 plus a subsequent fix.

Oct 30 2020, 8:03 AM · Restricted Project
aaronpuchert added a comment to D84604: Thread safety analysis: Consider global variables in scope.

I applied D87194 locally and rebuilt the original source, and not only am I seeing the original issue (also firing on DoThings() when it should only be on DoStuff()), I'm also seeing: error: acquiring mutex 'lock' requires negative capability '!lock' [-Werror,-Wthread-safety-negative], where lock is a local variable, defined as MutexLock lock(mutex_).

Oct 30 2020, 8:02 AM · Restricted Project

Oct 29 2020

aaronpuchert added a comment to D84604: Thread safety analysis: Consider global variables in scope.

Pushed a fix in rGbbed8cfe80cd27d3a47d877c7608d9be4e487d97. For now we just consider all static members as inaccessible, so we'll treat them as we did before this change.

Oct 29 2020, 4:42 PM · Restricted Project
aaronpuchert committed rGbbed8cfe80cd: Thread safety analysis: Consider static class members as inaccessible (authored by aaronpuchert).
Thread safety analysis: Consider static class members as inaccessible
Oct 29 2020, 4:38 PM
aaronpuchert added a comment to D84604: Thread safety analysis: Consider global variables in scope.

I'm seeing failures which I think are due to this patch -- I don't have a nice godbolt repro yet, but it's something like:

Oct 29 2020, 3:23 PM · Restricted Project

Oct 28 2020

aaronpuchert added a comment to D90129: Better source location for -Wignored-qualifiers on trailing return types.

Added the assertions in a follow-up change rGebfc427bbe08f0c36af9721d5a4e6d3ffe2e4bf5.

Oct 28 2020, 3:35 PM · Restricted Project
aaronpuchert committed rGebfc427bbe08: [Sema] Let getters assert that trailing return type exists, NFCI (authored by aaronpuchert).
[Sema] Let getters assert that trailing return type exists, NFCI
Oct 28 2020, 3:33 PM
aaronpuchert committed rG5dbccc6c89c0: Better source location for -Wignored-qualifiers on trailing return types (authored by aaronpuchert).
Better source location for -Wignored-qualifiers on trailing return types
Oct 28 2020, 3:33 PM
aaronpuchert closed D90129: Better source location for -Wignored-qualifiers on trailing return types.
Oct 28 2020, 3:33 PM · Restricted Project
aaronpuchert added inline comments to D88295: [Sema] Fix volatile check when test if a return object can be implicitly move.
Oct 28 2020, 8:12 AM · Restricted Project
aaronpuchert added inline comments to D90129: Better source location for -Wignored-qualifiers on trailing return types.
Oct 28 2020, 7:21 AM · Restricted Project
aaronpuchert added inline comments to D88295: [Sema] Fix volatile check when test if a return object can be implicitly move.
Oct 28 2020, 6:14 AM · Restricted Project
aaronpuchert added a comment to D88295: [Sema] Fix volatile check when test if a return object can be implicitly move.

Can't really add anything to the discussion between @Quuxplusone and the author, just a few comments about the test.

Oct 28 2020, 5:30 AM · Restricted Project

Oct 27 2020

aaronpuchert retitled D90129: Better source location for -Wignored-qualifiers on trailing return types from Source location for -Wignored-qualifiers on lambda trailing return type to Better source location for -Wignored-qualifiers on trailing return types.
Oct 27 2020, 6:38 PM · Restricted Project
aaronpuchert updated the diff for D90129: Better source location for -Wignored-qualifiers on trailing return types.

Collect location of a trailing return type in the parser, use that for the warning.

Oct 27 2020, 6:35 PM · Restricted Project

Oct 26 2020

aaronpuchert committed rG139785dc98ae: Add release tarballs for libclc (authored by aaronpuchert).
Add release tarballs for libclc
Oct 26 2020, 12:33 PM
aaronpuchert closed D90100: Add release tarballs for libclc.
Oct 26 2020, 12:33 PM · Restricted Project

Oct 25 2020

aaronpuchert added inline comments to D90129: Better source location for -Wignored-qualifiers on trailing return types.
Oct 25 2020, 6:48 PM · Restricted Project
aaronpuchert updated the summary of D90129: Better source location for -Wignored-qualifiers on trailing return types.
Oct 25 2020, 6:46 PM · Restricted Project
aaronpuchert requested review of D90129: Better source location for -Wignored-qualifiers on trailing return types.
Oct 25 2020, 6:44 PM · Restricted Project
aaronpuchert committed rGb296c64e64a0: Thread safety analysis: Nullability improvements in TIL, NFCI (authored by aaronpuchert).
Thread safety analysis: Nullability improvements in TIL, NFCI
Oct 25 2020, 11:38 AM
aaronpuchert committed rG5250a03a9959: Thread safety analysis: Consider global variables in scope (authored by aaronpuchert).
Thread safety analysis: Consider global variables in scope
Oct 25 2020, 11:36 AM
aaronpuchert closed D84604: Thread safety analysis: Consider global variables in scope.
Oct 25 2020, 11:35 AM · Restricted Project
aaronpuchert added inline comments to D84604: Thread safety analysis: Consider global variables in scope.
Oct 25 2020, 10:58 AM · Restricted Project
aaronpuchert added inline comments to D84604: Thread safety analysis: Consider global variables in scope.
Oct 25 2020, 10:39 AM · Restricted Project
aaronpuchert added inline comments to D90123: [Sema] Improve notes for value category mismatch in overloading.
Oct 25 2020, 10:26 AM · Restricted Project
aaronpuchert requested review of D90123: [Sema] Improve notes for value category mismatch in overloading.
Oct 25 2020, 10:09 AM · Restricted Project

Oct 24 2020

aaronpuchert updated the diff for D84604: Thread safety analysis: Consider global variables in scope.

LiteralPtrs aren't always globals, local variables are also translated that way. So we ask the stored ValueDecl if it isDefinedOutsideFunctionOrMethod. That seems like the right thing.

Oct 24 2020, 2:58 PM · Restricted Project
aaronpuchert reopened D84604: Thread safety analysis: Consider global variables in scope.

Almost forgot about that. I think I've figured it out.

Oct 24 2020, 2:54 PM · Restricted Project
aaronpuchert requested review of D90100: Add release tarballs for libclc.
Oct 24 2020, 10:08 AM · Restricted Project

Oct 1 2020

aaronpuchert committed rG1c1a81055807: libclc: Use find_package to find Python 3 and require it (authored by aaronpuchert).
libclc: Use find_package to find Python 3 and require it
Oct 1 2020, 1:32 PM
aaronpuchert closed D88366: libclc: Use find_package to find Python 3 and require it.
Oct 1 2020, 1:32 PM · Restricted Project

Sep 30 2020

aaronpuchert retitled D88366: libclc: Use find_package to find Python 3 and require it from libclc: Use find_package to find python and require it to libclc: Use find_package to find Python 3 and require it.
Sep 30 2020, 2:02 PM · Restricted Project
aaronpuchert updated the diff for D88366: libclc: Use find_package to find Python 3 and require it.

Use FindPython3 and remove shebang. The script didn't have an executable bit anyway.

Sep 30 2020, 1:59 PM · Restricted Project

Sep 26 2020

aaronpuchert committed rG485501899d6c: Fix sphinx warnings in AttributeReference, NFC (authored by aaronpuchert).
Fix sphinx warnings in AttributeReference, NFC
Sep 26 2020, 3:53 PM
aaronpuchert requested review of D88366: libclc: Use find_package to find Python 3 and require it.
Sep 26 2020, 2:23 PM · Restricted Project
aaronpuchert committed rGf702a6fa7c9e: Thread safety analysis: Improve documentation for ASSERT_CAPABILITY (authored by ryanofsky).
Thread safety analysis: Improve documentation for ASSERT_CAPABILITY
Sep 26 2020, 1:18 PM
aaronpuchert closed D87629: Thread safety analysis: Improve documentation for ASSERT_CAPABILITY.
Sep 26 2020, 1:18 PM · Restricted Project
aaronpuchert accepted D87629: Thread safety analysis: Improve documentation for ASSERT_CAPABILITY.

Maybe we'll have to clarify this further in the future, but for now this is an improvement.

Sep 26 2020, 1:09 PM · Restricted Project

Sep 18 2020

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

Sure, it makes perfect sense that it's too hard.

It's not really too hard, there is an existing parameter somewhere in the CFG generation that controls these exception handling edges, and we'd probably have to change some other diagnostics plus improve the performance/memory usage.

Sep 18 2020, 2:31 PM · Restricted Project

Sep 17 2020

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

Looks pretty good, thanks! I think this clears up the misunderstandings.

Sep 17 2020, 4:24 PM · Restricted Project
aaronpuchert 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?

Mutex m;
int i GUARDED_BY(m);

static void thrower() { throw std::exception(); }
void f() { i = 1; }
void g() {
    try {
        thrower();
    } catch (...) {
        i = 5;
    }
    i = 6;
}

gives me warnings for i=1 and i=6 but not i=5 ?

Sep 17 2020, 12:38 AM · Restricted Project

Sep 16 2020

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

The mistakes about exceptions came from me taking "(no return)" in the previous documentation too literally thinking it was referring to https://en.cppreference.com/w/cpp/language/attributes/noreturn.

The key here is the word "assumed". We treat the function as if it looks like this:

Sep 16 2020, 4:03 PM · Restricted Project

Sep 14 2020

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

You can view it this way: there is a dynamic set and a static set of capabilities. The static set is always the same at any particular point in a function, regardless of the circumstances we're called from. It's what we determine in the analysis. The dynamic set depends on who called us and could be greater. To illustrate the difference:

Sep 14 2020, 5:15 PM · Restricted Project
aaronpuchert added reviewers for D87629: Thread safety analysis: Improve documentation for ASSERT_CAPABILITY: aaron.ballman, aaronpuchert.

We don't really have a good understanding of ASSERT_CAPABILITY ourselves. For example, there is this loophole:

Sep 14 2020, 4:19 PM · Restricted Project

Sep 6 2020

aaronpuchert committed rGbbb3baf6205c: Thread safety analysis: Improve documentation for scoped capabilities (authored by aaronpuchert).
Thread safety analysis: Improve documentation for scoped capabilities
Sep 6 2020, 11:38 AM
aaronpuchert committed rGcc6713a2c35e: Thread safety analysis: Test and document release_generic_capability (authored by aaronpuchert).
Thread safety analysis: Test and document release_generic_capability
Sep 6 2020, 11:38 AM
aaronpuchert closed D87066: Thread safety analysis: Improve documentation for scoped capabilities.
Sep 6 2020, 11:38 AM · Restricted Project
aaronpuchert closed D87064: Thread safety analysis: Test and document release_generic_capability.
Sep 6 2020, 11:38 AM · Restricted Project

Sep 5 2020

aaronpuchert committed rGda6b3aa4c6bb: Attempt to fix Sphinx build failure, NFC (authored by aaronpuchert).
Attempt to fix Sphinx build failure, NFC
Sep 5 2020, 9:28 AM
aaronpuchert committed rGd3a779fe2150: Restore size of TemplateParameterList after D44352 (authored by aaronpuchert).
Restore size of TemplateParameterList after D44352
Sep 5 2020, 9:02 AM
aaronpuchert committed rGb2ce79ef6615: Thread safety analysis: ValueDecl in Project is non-null (authored by aaronpuchert).
Thread safety analysis: ValueDecl in Project is non-null
Sep 5 2020, 8:27 AM
aaronpuchert committed rG9dcc82f34ea9: Thread safety analysis: Consider global variables in scope (authored by aaronpuchert).
Thread safety analysis: Consider global variables in scope
Sep 5 2020, 8:27 AM
aaronpuchert closed D84604: Thread safety analysis: Consider global variables in scope.
Sep 5 2020, 8:27 AM · Restricted Project
aaronpuchert requested review of D87194: Thread safety analysis: Use access specifiers to decide about scope.
Sep 5 2020, 8:25 AM · Restricted Project
aaronpuchert committed rG16975a638df3: Set InvalidDecl directly when deserializing a Decl (authored by aaronpuchert).
Set InvalidDecl directly when deserializing a Decl
Sep 5 2020, 5:27 AM
aaronpuchert committed rG8544defdcb09: Thread safety analysis: Document how try-acquire is handled (authored by aaronpuchert).
Thread safety analysis: Document how try-acquire is handled
Sep 5 2020, 5:27 AM
aaronpuchert closed D86207: Set InvalidDecl directly when deserializing a Decl.
Sep 5 2020, 5:27 AM · Restricted Project
aaronpuchert closed D87065: Thread safety analysis: Document how try-acquire is handled.
Sep 5 2020, 5:27 AM · Restricted Project

Sep 4 2020

aaronpuchert updated the diff for D87064: Thread safety analysis: Test and document release_generic_capability.

Add some prose, not just code. Otherwise our list of attributes would be incomplete.

Sep 4 2020, 3:39 PM · Restricted Project

Sep 3 2020

aaronpuchert updated the diff for D84604: Thread safety analysis: Consider global variables in scope.

Add tests with qualified names, let tests rely on shadowing.

Sep 3 2020, 5:06 PM · Restricted Project
aaronpuchert added inline comments to D84604: Thread safety analysis: Consider global variables in scope.
Sep 3 2020, 5:05 PM · Restricted Project
aaronpuchert updated the summary of D87066: Thread safety analysis: Improve documentation for scoped capabilities.
Sep 3 2020, 3:44 PM · Restricted Project
aaronpuchert updated the diff for D87066: Thread safety analysis: Improve documentation for scoped capabilities.
  • More detailed description how scoped capabilities work.
  • Make the comment wording more consistent with existing comments and the previous explanation.
  • Properly implement the destructor in the presence of an Unlock() function: we need to keep track of the status then.
  • Add try-acquire functions on scoped lock.
  • Fix compiler errors.
Sep 3 2020, 3:43 PM · Restricted Project
aaronpuchert added inline comments to D87066: Thread safety analysis: Improve documentation for scoped capabilities.
Sep 3 2020, 9:25 AM · Restricted Project

Sep 2 2020

aaronpuchert added a comment to D87066: Thread safety analysis: Improve documentation for scoped capabilities.

Not sure about the added comments, I can also remove them if they're not helpful.

Sep 2 2020, 6:03 PM · Restricted Project
aaronpuchert requested review of D87066: Thread safety analysis: Improve documentation for scoped capabilities.
Sep 2 2020, 6:02 PM · Restricted Project
aaronpuchert requested review of D87065: Thread safety analysis: Document how try-acquire is handled.
Sep 2 2020, 5:55 PM · Restricted Project
aaronpuchert requested review of D87064: Thread safety analysis: Test and document release_generic_capability.
Sep 2 2020, 5:52 PM · Restricted Project
aaronpuchert retitled D86207: Set InvalidDecl directly when deserializing a Decl from (De-)serialize BindingDecls before DecompositionDecl to Set InvalidDecl directly when deserializing a Decl.
Sep 2 2020, 5:39 PM · Restricted Project
aaronpuchert updated the diff for D86207: Set InvalidDecl directly when deserializing a Decl.

Fix as suggested by @rsmith instead: set InvalidDecl directly.

Sep 2 2020, 5:37 PM · Restricted Project
aaronpuchert added a comment to D86207: Set InvalidDecl directly when deserializing a Decl.

Everything compiles with ValueDecl* Decomp instead of a LazyDeclPtr, but I'll leave it until we figure out whether we might actually need it.

Sep 2 2020, 5:26 PM · Restricted Project
aaronpuchert added a comment to D86207: Set InvalidDecl directly when deserializing a Decl.

I'll go with what @rsmith proposed to fix the bug. If the entire deserialization process doesn't rely on invariants, the order should indeed be irrelevant.

Sep 2 2020, 5:01 PM · Restricted Project