Page MenuHomePhabricator

xazax.hun (Gábor Horváth)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 17 2012, 3:16 AM (366 w, 1 h)

Recent Activity

Tue, Sep 3

xazax.hun committed rG6f98400189a6: [LifetimeAnalysis] Fix some false positives (authored by xazax.hun).
[LifetimeAnalysis] Fix some false positives
Tue, Sep 3, 9:18 AM

Tue, Aug 27

xazax.hun created D66806: [LifetimeAnalysis] Fix some false positives.
Tue, Aug 27, 8:31 AM · Restricted Project, Restricted Project

Mon, Aug 26

xazax.hun abandoned D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes.

It looks like this solution is not going to work in general. The problem is that it can be really hard to tell when it is valid to create a gsl::Pointer from an unannotated local type.

Mon, Aug 26, 3:16 PM · Restricted Project
xazax.hun committed rG3ba0f3c9b7f1: [NFC] Add comments to some bool arguments for better readability (authored by xazax.hun).
[NFC] Add comments to some bool arguments for better readability
Mon, Aug 26, 10:22 AM
xazax.hun added inline comments to D66686: [LifetimeAnalysis] Make it possible to disable the new warnings.
Mon, Aug 26, 10:02 AM · Restricted Project, Restricted Project

Aug 23 2019

xazax.hun abandoned D66686: [LifetimeAnalysis] Make it possible to disable the new warnings.

Committed in https://reviews.llvm.org/rG6379e5c8a441 due to it was urgent for some users. Will address any comments post-commit.

Aug 23 2019, 3:39 PM · Restricted Project, Restricted Project
xazax.hun committed rG665a64265e7e: Fix a test to test what the name suggest. (authored by xazax.hun).
Fix a test to test what the name suggest.
Aug 23 2019, 3:29 PM
xazax.hun committed rG6379e5c8a441: [LifetimeAnalysis] Make it possible to disable the new warnings (authored by xazax.hun).
[LifetimeAnalysis] Make it possible to disable the new warnings
Aug 23 2019, 3:23 PM
xazax.hun updated the diff for D66686: [LifetimeAnalysis] Make it possible to disable the new warnings.
  • Added a test.
Aug 23 2019, 3:14 PM · Restricted Project, Restricted Project
xazax.hun updated the summary of D66686: [LifetimeAnalysis] Make it possible to disable the new warnings.
Aug 23 2019, 2:55 PM · Restricted Project, Restricted Project
xazax.hun updated the diff for D66686: [LifetimeAnalysis] Make it possible to disable the new warnings.
  • Add the actual diff.
Aug 23 2019, 2:48 PM · Restricted Project, Restricted Project
xazax.hun created D66686: [LifetimeAnalysis] Make it possible to disable the new warnings.
Aug 23 2019, 2:47 PM · Restricted Project, Restricted Project
xazax.hun added a comment to D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes.

Sounds good! Let's do that :)

Aug 23 2019, 1:31 PM · Restricted Project
xazax.hun added a comment to D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes.

Yeah, the analysis would work fine in this case. But that would mean that we should not propagate the Pointer annotations to derived classes as some of them in the wild do not follow the same ownership model.

Aug 23 2019, 12:46 PM · Restricted Project
xazax.hun added a comment to D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes.

Also it feels a bit weird to change the ownership semantics in a derived class, I bet that would violate the Liskov substitution principle.

And then we see that llvm::OwningArrayRef inherits from llvm::ArrayRef ... But maybe this direction (strengthening a Pointer into an Owner)
is okay.

Aug 23 2019, 12:10 PM · Restricted Project

Aug 22 2019

xazax.hun added a comment to D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes.

In the false-positive example, after the DerivedToBase, we see a constructor call which I think is the copy constructor.

Aug 22 2019, 4:24 PM · Restricted Project

Aug 21 2019

xazax.hun accepted D66565: [analyzer] pr43036: Fix support for operator `sizeof...'..

LG!

Aug 21 2019, 5:05 PM · Restricted Project, Restricted Project
xazax.hun added inline comments to D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType).
Aug 21 2019, 9:21 AM · Restricted Project, Restricted Project
xazax.hun added inline comments to D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes.
Aug 21 2019, 9:02 AM · Restricted Project

Aug 20 2019

xazax.hun accepted D65575: [analyzer] Mention whether an event is about a condition in a bug report part 1.

*actually accepting*

Aug 20 2019, 4:14 PM · Restricted Project, Restricted Project
xazax.hun added a comment to D65575: [analyzer] Mention whether an event is about a condition in a bug report part 1.

LGTM! I think the UIs could do better displaying this info in the future but this is not your job :)

Aug 20 2019, 4:14 PM · Restricted Project, Restricted Project
xazax.hun added a comment to D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes.

Ok, I think I know what is going on.

Aug 20 2019, 3:06 PM · Restricted Project
xazax.hun added a comment to D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes.

This change might be the cause for the false-positive in https://github.com/mgehre/llvm-project/issues/45. Could you check?

Aug 20 2019, 2:31 PM · Restricted Project
xazax.hun accepted D66460: [analyzer] Remove BugReporter.BugTypes..

LG!

Aug 20 2019, 2:03 PM · Restricted Project
xazax.hun added inline comments to D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType).
Aug 20 2019, 11:21 AM · Restricted Project, Restricted Project
xazax.hun added inline comments to D66303: [LifetimeAnalysis] Add support for free functions.
Aug 20 2019, 10:31 AM · Restricted Project, Restricted Project
xazax.hun created D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes.
Aug 20 2019, 10:25 AM · Restricted Project
xazax.hun committed rGeaee4de503ca: [LifetimeAnalysis] Add support for free functions (authored by xazax.hun).
[LifetimeAnalysis] Add support for free functions
Aug 20 2019, 9:48 AM

Aug 19 2019

xazax.hun added a comment to D66443: [LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef.

I do not know if there are some build bots with -Werror that would warn for unknown attributes. In case it fails the build bots we could extend the include/llvm/Support/Compiler.h header with a macro.

Aug 19 2019, 2:55 PM · Restricted Project

Aug 15 2019

xazax.hun created D66303: [LifetimeAnalysis] Add support for free functions.
Aug 15 2019, 9:14 AM · Restricted Project, Restricted Project

Aug 14 2019

xazax.hun committed rGbfe0c376014e: [LifetimeAnalysis] Fix false negatives of statement local lifetime analysis for… (authored by xazax.hun).
[LifetimeAnalysis] Fix false negatives of statement local lifetime analysis for…
Aug 14 2019, 9:36 AM

Aug 13 2019

xazax.hun added inline comments to D66164: [LifetimeAnalysis] Support std::stack::top() and std::optional::value().
Aug 13 2019, 3:33 PM · Restricted Project, Restricted Project
xazax.hun added inline comments to D66164: [LifetimeAnalysis] Support std::stack::top() and std::optional::value().
Aug 13 2019, 3:04 PM · Restricted Project, Restricted Project
xazax.hun accepted D66164: [LifetimeAnalysis] Support std::stack::top() and std::optional::value().

LG! But let's wait for Dmitri :)

Aug 13 2019, 2:12 PM · Restricted Project, Restricted Project
xazax.hun added a comment to D66152: Fix false negatives of statement local lifetime analysis for some STL implementation.

Apologies for going off-topic, but would it make sense to start lifetime related patches with the tag [LifetimeAnalysis] or similar (like [analyzer] for static analyzer patches)? I dont feel knowledgable enough to participate, but would gladly add a herald rule to be subscribed and learn about the development process of it.

Aug 13 2019, 11:14 AM · Restricted Project, Restricted Project
xazax.hun added inline comments to D66152: Fix false negatives of statement local lifetime analysis for some STL implementation.
Aug 13 2019, 10:34 AM · Restricted Project, Restricted Project
xazax.hun created D66152: Fix false negatives of statement local lifetime analysis for some STL implementation.
Aug 13 2019, 10:34 AM · Restricted Project, Restricted Project
xazax.hun added reviewers for D66136: Remove no-op callbacks from TemplateInstantiationCallback: Szelethus, sabel83.

The changes look good to me. Added some folks who might have more knowledge about the original purpose.

Aug 13 2019, 6:55 AM · Restricted Project

Aug 12 2019

xazax.hun added a comment to D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes.

Hi. I noticed in our builders that both of the warnings introduced in this patch are being diagnosed for pointers that don't use GSL at all. I'm attempting to make a small reproducer now.

Hi!

Clang now apply GSL annotations for some STL types automatically. So this is the expected behavior. Are any of those warnings unwanted/false positive with the newest Clang version? If so, please share the reproducers and I will either fix them ASAP or revert/turn off the warnings.

Thanks! I didn't know that they were applied to stl types. This could explain why the warning is raised in my case (std::string), but I don't think there's anything wrong in this example that would lead to a warning:

leonardchan@cp-snakewater:~/llvm-monorepo/llvm-build-3-master$ cat ~/misc/test.cpp
#include <string>

std::string MakeStr();
void other_func(const char *s);

void func(std::string s) {
  const char *x = MakeStr().c_str();
  other_func(x);
}
leonardchan@cp-snakewater:~/llvm-monorepo/llvm-build-3-master$ ~/llvm-monorepo/llvm-build-3-master/bin/clang++ -c ~/misc/test.cpp
/usr/local/google/home/leonardchan/misc/test.cpp:7:19: warning: object backing the pointer will be destroyed at the end of the full-expression [-Wdangling]
  const char *x = MakeStr().c_str();
                  ^~~~~~~~~
1 warning generated.

This was made using a release build from ToT clang.

Aug 12 2019, 5:09 PM · Restricted Project, Restricted Project
xazax.hun added a comment to D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes.

Hi. I noticed in our builders that both of the warnings introduced in this patch are being diagnosed for pointers that don't use GSL at all. I'm attempting to make a small reproducer now.

Aug 12 2019, 3:15 PM · Restricted Project, Restricted Project
xazax.hun committed rGc6802b231f9c: Fix multiple lifetime warning messages for range based for loop (authored by xazax.hun).
Fix multiple lifetime warning messages for range based for loop
Aug 12 2019, 9:22 AM

Aug 11 2019

xazax.hun committed rGe812bf553087: Properly detect temporary gsl::Owners through reference initialization chains. (authored by xazax.hun).
Properly detect temporary gsl::Owners through reference initialization chains.
Aug 11 2019, 7:43 AM
xazax.hun committed rG3560ed052354: Properly handle reference initialization when detecting gsl::Pointer… (authored by xazax.hun).
Properly handle reference initialization when detecting gsl::Pointer…
Aug 11 2019, 1:09 AM

Aug 9 2019

xazax.hun committed rGeb563af70b54: Fix a false positive warning when initializing members with gsl::Owners. (authored by xazax.hun).
Fix a false positive warning when initializing members with gsl::Owners.
Aug 9 2019, 5:35 PM
xazax.hun committed rG795c3667d910: Attempt to reapply "Even more warnings utilizing gsl::Owner/gsl::Pointer… (authored by xazax.hun).
Attempt to reapply "Even more warnings utilizing gsl::Owner/gsl::Pointer…
Aug 9 2019, 4:07 PM
xazax.hun committed rG67a7530b4727: Revert Even more warnings utilizing gsl::Owner/gsl::Pointer annotations (authored by xazax.hun).
Revert Even more warnings utilizing gsl::Owner/gsl::Pointer annotations
Aug 9 2019, 12:02 PM
xazax.hun committed rGfd85c894eb68: Revert Fix a build bot failure and multiple warnings instances for range base… (authored by xazax.hun).
Revert Fix a build bot failure and multiple warnings instances for range base…
Aug 9 2019, 11:58 AM
xazax.hun committed rG2bf522aea62e: Fix a build bot failure and multiple warnings instances for range base for loops (authored by xazax.hun).
Fix a build bot failure and multiple warnings instances for range base for loops
Aug 9 2019, 10:44 AM
xazax.hun committed rG7c3c8ba8daf4: Even more warnings utilizing gsl::Owner/gsl::Pointer annotations (authored by xazax.hun).
Even more warnings utilizing gsl::Owner/gsl::Pointer annotations
Aug 9 2019, 10:12 AM
xazax.hun committed rGc1dafd7b534c: More warnings regarding gsl::Pointer and gsl::Owner attributes (authored by xazax.hun).
More warnings regarding gsl::Pointer and gsl::Owner attributes
Aug 9 2019, 8:19 AM

Aug 8 2019

xazax.hun added inline comments to D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes.
Aug 8 2019, 2:06 PM · Restricted Project, Restricted Project
xazax.hun updated the diff for D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes.
  • Fix review comments.
Aug 8 2019, 2:04 PM · Restricted Project, Restricted Project
xazax.hun added a comment to D65723: [analyzer][NFC] Add different interestingness kinds.

As this thing will now be part of the checker interface it would be great to have some guidelines which interestingness kind to use (or, when to use interestingness at all). I am totally fine with addressing this in a followup patch though.

Aug 8 2019, 1:35 PM · Restricted Project, Restricted Project
xazax.hun added a comment to D65575: [analyzer] Mention whether an event is about a condition in a bug report part 1.

Yeah, this is important bike-shedding from the user point of view. Otherwise it looks good to me.

Aug 8 2019, 1:31 PM · Restricted Project, Restricted Project
xazax.hun added inline comments to D65287: [analyzer][CFG] Don't track the condition of asserts.
Aug 8 2019, 1:25 PM · Restricted Project, Restricted Project
xazax.hun added inline comments to D65127: Even more warnings utilizing gsl::Owner/gsl::Pointer annotations.
Aug 8 2019, 12:46 PM · Restricted Project, Restricted Project

Aug 7 2019

xazax.hun added inline comments to D65724: [analyzer] Don't make ConditionBRVisitor events prunable when the condition is an interesting field.
Aug 7 2019, 3:19 PM · Restricted Project, Restricted Project
xazax.hun added inline comments to D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes.
Aug 7 2019, 11:13 AM · Restricted Project, Restricted Project

Aug 6 2019

xazax.hun committed rGe5e10b526f2f: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes (authored by xazax.hun).
Teach some warnings to respect gsl::Pointer and gsl::Owner attributes
Aug 6 2019, 12:17 PM
xazax.hun added inline comments to D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes.
Aug 6 2019, 8:43 AM · Restricted Project, Restricted Project
xazax.hun added inline comments to D65127: Even more warnings utilizing gsl::Owner/gsl::Pointer annotations.
Aug 6 2019, 8:34 AM · Restricted Project, Restricted Project
xazax.hun added inline comments to D65127: Even more warnings utilizing gsl::Owner/gsl::Pointer annotations.
Aug 6 2019, 6:56 AM · Restricted Project, Restricted Project

Jul 29 2019

xazax.hun added inline comments to D64991: [analyzer][WIP] Implement a primitive reaching definitions analysis.
Jul 29 2019, 9:19 PM · Restricted Project
xazax.hun accepted D65290: [analyzer][NFC] Prove that we only track the evaluated part of the condition.

More tests are always welcome :)

Jul 29 2019, 9:06 PM · Restricted Project, Restricted Project
xazax.hun added inline comments to D65287: [analyzer][CFG] Don't track the condition of asserts.
Jul 29 2019, 9:02 PM · Restricted Project, Restricted Project
xazax.hun added a comment to D65361: [analyzer] Trust global initializers when analyzing main()..

I like the change.

Jul 29 2019, 8:49 PM · Restricted Project, Restricted Project
xazax.hun added a comment to D65381: [analyzer][NFC] Refactoring BugReporter.cpp P3.: std::shared_pointer<PathDiagnosticPiece> -> PathDiagnosticPieceRef.

Just wondering, did you check if we actually need shared ownership for this type? If not, do not waste your time checking for now :)

Jul 29 2019, 8:43 PM · Restricted Project, Restricted Project
xazax.hun accepted D65349: [analyzer] Be more careful with destructors of non-regions..

LG!

Jul 29 2019, 8:35 PM · Restricted Project, Restricted Project
xazax.hun accepted D65379: [analyzer][NFC] Refactoring BugReporter.cpp P2.: Clean up the construction of bug paths and finding a valid report.

Looks good, some nits inline. I agree with Artem, we should consider omitting the trimming and document how to get something similar if desired for debugging.

Jul 29 2019, 8:30 PM · Restricted Project, Restricted Project
xazax.hun accepted D65378: [analyzer][NFC] Refactoring BugReporter.cpp P1.: Store interesting symbols/regions in a simple set.

LGTM! I also do not see much value in the old code at this point. I would expect PathDiagnosticConsumers to be independent of the interesting symbols/regions.

Jul 29 2019, 8:15 PM · Restricted Project, Restricted Project
xazax.hun added a comment to D65182: [analyzer] Add fix-it hint support..

The direction looks good to me. I wonder if it is worth to add some warnings somewhere that it is really tricky to come up with reasonable fixits for most path sensitive checks.

Jul 29 2019, 8:08 PM · Restricted Project, Restricted Project
xazax.hun added a comment to D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes.

Thanks for the review!
Since I did some refactoring I will wait for an additional accept before committing.

Jul 29 2019, 11:37 AM · Restricted Project, Restricted Project
xazax.hun added inline comments to D65127: Even more warnings utilizing gsl::Owner/gsl::Pointer annotations.
Jul 29 2019, 11:37 AM · Restricted Project, Restricted Project
xazax.hun updated the diff for D65127: Even more warnings utilizing gsl::Owner/gsl::Pointer annotations.
  • Rebase, add the results of testing on real world projects to the description.
Jul 29 2019, 11:37 AM · Restricted Project, Restricted Project
xazax.hun added inline comments to D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes.
Jul 29 2019, 11:31 AM · Restricted Project, Restricted Project
xazax.hun updated the diff for D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes.
  • Add new line to end of file.
  • Rebase, calls no longer need special handling.
Jul 29 2019, 11:31 AM · Restricted Project, Restricted Project
xazax.hun updated the diff for D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes.
  • Actually move the code snippet in question.
Jul 29 2019, 11:31 AM · Restricted Project, Restricted Project
xazax.hun added inline comments to D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes.
Jul 29 2019, 11:31 AM · Restricted Project, Restricted Project
xazax.hun updated the diff for D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes.
  • A small refactoring based on an observation from a review comment.
Jul 29 2019, 11:24 AM · Restricted Project, Restricted Project

Jul 24 2019

xazax.hun updated the diff for D65127: Even more warnings utilizing gsl::Owner/gsl::Pointer annotations.
  • Rebase
Jul 24 2019, 12:28 PM · Restricted Project, Restricted Project
xazax.hun updated the diff for D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes.
  • Remove unused parameter.
Jul 24 2019, 12:27 PM · Restricted Project, Restricted Project
xazax.hun updated the diff for D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes.
  • Fix a false positive case found by running over ~200 open source projects
Jul 24 2019, 12:24 PM · Restricted Project, Restricted Project
xazax.hun added a comment to D65127: Even more warnings utilizing gsl::Owner/gsl::Pointer annotations.

I have run this successfully on ~192 open source projects.

Jul 24 2019, 9:48 AM · Restricted Project, Restricted Project

Jul 22 2019

xazax.hun added a child revision for D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes: D65127: Even more warnings utilizing gsl::Owner/gsl::Pointer annotations.
Jul 22 2019, 5:38 PM · Restricted Project, Restricted Project
xazax.hun added a parent revision for D65127: Even more warnings utilizing gsl::Owner/gsl::Pointer annotations: D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes.
Jul 22 2019, 5:38 PM · Restricted Project, Restricted Project
xazax.hun created D65127: Even more warnings utilizing gsl::Owner/gsl::Pointer annotations.
Jul 22 2019, 5:38 PM · Restricted Project, Restricted Project
xazax.hun added inline comments to D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes.
Jul 22 2019, 5:20 PM · Restricted Project, Restricted Project
xazax.hun added inline comments to D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes.
Jul 22 2019, 3:35 PM · Restricted Project, Restricted Project
xazax.hun added a child revision for D64448: gsl::Owner/gsl::Pointer: Add implicit annotations for some std types: D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes.
Jul 22 2019, 3:35 PM · Restricted Project, Restricted Project
xazax.hun added parent revisions for D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes: D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes, D64448: gsl::Owner/gsl::Pointer: Add implicit annotations for some std types.
Jul 22 2019, 3:35 PM · Restricted Project, Restricted Project
xazax.hun added a child revision for D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes: D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes.
Jul 22 2019, 3:35 PM · Restricted Project, Restricted Project
xazax.hun created D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes.
Jul 22 2019, 3:31 PM · Restricted Project, Restricted Project
xazax.hun updated the diff for D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes.
  • Fix a false positive from previous change.
Jul 22 2019, 11:12 AM · Restricted Project, Restricted Project
xazax.hun updated the diff for D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes.
  • Fix a TODO and add some more tests.
Jul 22 2019, 10:34 AM · Restricted Project, Restricted Project
xazax.hun updated the diff for D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes.
  • Address the rest of the review comments.
Jul 22 2019, 9:27 AM · Restricted Project, Restricted Project

Jul 17 2019

xazax.hun added inline comments to D64232: [analyzer] Prune calls to functions with linear CFGs that return a non-zero constrained value.
Jul 17 2019, 11:44 AM · Restricted Project, Restricted Project
xazax.hun added inline comments to D64270: [analyzer][NFC] Prepare visitors for different tracking kinds.
Jul 17 2019, 11:38 AM · Restricted Project, Restricted Project
xazax.hun accepted D64287: [analyzer] Track the right hand side of the last store regardless of its value.

Since we allow new kinds of SVals to be tracked it would be great to test this first on a larger corpus of projects just to see if there is a crash (due to an unhandled SVal type).

Jul 17 2019, 11:34 AM · Restricted Project
xazax.hun added a comment to D64272: [analyzer] Note last writes to a condition only in a nested stackframe.

I have one small question otherwise looks good.

Jul 17 2019, 11:33 AM · Restricted Project, Restricted Project

Jul 11 2019

xazax.hun added inline comments to D63954: Add lifetime categories attributes.
Jul 11 2019, 12:13 PM · Restricted Project, Restricted Project