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 (479 w, 5 d)

Recent Activity

Thu, Nov 25

xazax.hun accepted D114234: [clang][dataflow] Add base types for building dataflow analyses.

Thanks, it looks good to me. Most of my comments are just brainstorming, exploring alternative ideas. Feel free to ignore some/all of them.

Thu, Nov 25, 3:21 PM · Restricted Project

Wed, Nov 24

xazax.hun added a comment to D114510: [analyzer] Ignore flex generated files.

I wonder if this feature should be part of CodeChecker/scan-build instead (potentially under an option).

Wed, Nov 24, 7:54 AM

Fri, Nov 19

xazax.hun accepted D114254: [libtooling][clang-tidy] Fix crashing on rendering invalid SourceRanges.
Fri, Nov 19, 12:19 PM · Restricted Project
xazax.hun added inline comments to D114234: [clang][dataflow] Add base types for building dataflow analyses.
Fri, Nov 19, 11:45 AM · Restricted Project
xazax.hun added a comment to D114231: [clang][docs][dataflow] Added an introduction to dataflow analysis.

Thanks for working on this! Publishing documentation alongside the feature is a great practice. I liked this documentation a lot. I have strong opinion about the ambiguous use of path condition in this document, otherwise I was only nitpicking.

Fri, Nov 19, 11:27 AM · Restricted Project

Mon, Nov 15

xazax.hun requested changes to D111795: [analyzer] Reject incomplete matches in CallEvent::isCalled(), also introduce wildcards.
Mon, Nov 15, 12:19 PM
xazax.hun accepted D111795: [analyzer] Reject incomplete matches in CallEvent::isCalled(), also introduce wildcards.
Mon, Nov 15, 11:43 AM

Fri, Nov 12

xazax.hun added a comment to D111795: [analyzer] Reject incomplete matches in CallEvent::isCalled(), also introduce wildcards.

I wouldn't mind, but it would make the matching even more difficult, potentially backtracking (?) which I'm not really a fan of.

Fri, Nov 12, 11:17 AM
xazax.hun added a comment to D113588: [analyzer][NFC] Make the API of CallDescription safer slightly.

Are there other classes in LLVM taking a single ArrayRef in the constructor? Are they using similar techniques to avoid potential problems?

Fri, Nov 12, 9:34 AM
xazax.hun accepted D113587: [analyzer][NFC] Separate CallDescription from CallEvent.
Fri, Nov 12, 9:33 AM · Restricted Project, Restricted Project
xazax.hun accepted D113595: [analyzer][NFC] Use enum for CallDescription flags.
Fri, Nov 12, 9:32 AM · Restricted Project
xazax.hun added a comment to D113594: [analyzer][NFC] Consolidate the inner representation of CallDescriptions.

While you have a large stack, some of these changes should be relatively independent. I'd recommend committing those regardless of the status of the rest of the stack.

Fri, Nov 12, 9:30 AM · Restricted Project
xazax.hun accepted D113594: [analyzer][NFC] Consolidate the inner representation of CallDescriptions.

Nice cleanup!

Fri, Nov 12, 9:29 AM · Restricted Project
xazax.hun accepted D113593: [analyzer][NFC] CallDescription should own the qualified name parts.
Fri, Nov 12, 9:26 AM · Restricted Project
xazax.hun accepted D113592: [analyzer][NFC] Demonstrate the use of CallDescriptionSet.
Fri, Nov 12, 9:25 AM · Restricted Project
xazax.hun accepted D113591: [analyzer][NFC] Switch to using CallDescription::matches() instead of isCalled().

Once I understand the motivation behind CallDescription::matches(), this patch looks good. The use of variadic matching is a nice cleanup.

Fri, Nov 12, 9:24 AM · Restricted Project
xazax.hun added a comment to D113590: [analyzer][NFC] Introduce CallDescription::matches() in addition to isCalled().

I like the idea of introducing variadic versions of the matching. But what is the motivation behind introducing new methods that are discouraged to use? I think the motivation behind these changes should be included in the description and the commit message.

Fri, Nov 12, 9:21 AM · Restricted Project
xazax.hun added a comment to D111795: [analyzer] Reject incomplete matches in CallEvent::isCalled(), also introduce wildcards.

Alternatively, if we do not want the wildcard to match multiple names, I'd suggest using "?" which is more conventional to match a single item.

Fri, Nov 12, 9:10 AM
xazax.hun requested changes to D111795: [analyzer] Reject incomplete matches in CallEvent::isCalled(), also introduce wildcards.

I like the overall idea of being strict by default and use wild cards to get the previous behavior. I am not convinced, however, about the current matching strategy.

Fri, Nov 12, 9:09 AM

Oct 28 2021

xazax.hun added a comment to D112646: [clang-tidy] Add `readability-container-contains` check.

@xazax.hun I think you did something similar wrt. empty(), right? Could you take a look at this?

Oct 28 2021, 10:00 PM · Restricted Project

Oct 14 2021

xazax.hun accepted D111534: [analyzer][NFC] Refactor CallEvent::isCalled().
Oct 14 2021, 10:14 AM · Restricted Project

Oct 13 2021

xazax.hun added inline comments to D111534: [analyzer][NFC] Refactor CallEvent::isCalled().
Oct 13 2021, 7:31 AM · Restricted Project

Jul 20 2021

xazax.hun added inline comments to D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling.
Jul 20 2021, 7:08 AM · Restricted Project
xazax.hun accepted D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling.

LGTM!

Jul 20 2021, 7:05 AM · Restricted Project

Jul 19 2021

xazax.hun requested changes to D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling.

Commented some nits, but overall looks good to me.

Jul 19 2021, 12:17 PM · Restricted Project

Jul 5 2021

xazax.hun accepted D104616: [analyzer] Model comparision methods of std::unique_ptr.

The latest version looks good to me, let's land this!

Jul 5 2021, 10:48 AM · Restricted Project
xazax.hun requested changes to D104616: [analyzer] Model comparision methods of std::unique_ptr.
Jul 5 2021, 8:45 AM · Restricted Project

Jul 2 2021

xazax.hun added inline comments to D104616: [analyzer] Model comparision methods of std::unique_ptr.
Jul 2 2021, 8:26 AM · Restricted Project

Jun 25 2021

xazax.hun added inline comments to D104616: [analyzer] Model comparision methods of std::unique_ptr.
Jun 25 2021, 7:59 AM · Restricted Project
xazax.hun added inline comments to D104616: [analyzer] Model comparision methods of std::unique_ptr.
Jun 25 2021, 7:47 AM · Restricted Project

Jun 24 2021

xazax.hun added inline comments to D104616: [analyzer] Model comparision methods of std::unique_ptr.
Jun 24 2021, 12:13 PM · Restricted Project

Jun 22 2021

xazax.hun added a comment to D104616: [analyzer] Model comparision methods of std::unique_ptr.

Looks like I have wasted a good deal of effort. :(

Jun 22 2021, 9:06 PM · Restricted Project
xazax.hun added a comment to D104616: [analyzer] Model comparision methods of std::unique_ptr.

Why not simply delegate this job to assume(evalBinOp(...)) over raw pointer values, which already has all this logic written down nicely?

Jun 22 2021, 3:54 PM · Restricted Project

Jun 21 2021

xazax.hun added a comment to D104616: [analyzer] Model comparision methods of std::unique_ptr.

If (ptr1 == ptr2) is false, we can't say anything really.

Jun 21 2021, 6:02 AM · Restricted Project

Jun 19 2021

xazax.hun added a comment to D103750: [analyzer] Handle std::make_unique for SmartPtrModeling.

What about this?

Jun 19 2021, 11:38 AM · Restricted Project

Jun 18 2021

xazax.hun added a comment to D103750: [analyzer] Handle std::make_unique for SmartPtrModeling.

Do you want the new failing test to be marked expected to fail?

Jun 18 2021, 10:53 AM · Restricted Project

Jun 17 2021

xazax.hun added a comment to D98726: [analyzer] Enabling MallocChecker to take up after SmartPtrModelling.

We probably did not update this PR with the discussions we had offline. Basically we had a bug with a sink node due to calling into a destructor of unique_ptr. The catch is that the ctor was evalcalled, so the store did not have the correct bindings. Thus, after inlining the dtor the analyzer though we are reading garbage values from memory and a sink node was generated. SuppressOnSink machinery suppressed the leak warning.

Jun 17 2021, 4:17 PM · Restricted Project
xazax.hun added inline comments to D104300: [analyzer] Handle std::swap for std::unique_ptr.
Jun 17 2021, 4:12 PM · Restricted Project
xazax.hun added a comment to D103750: [analyzer] Handle std::make_unique for SmartPtrModeling.

I believe there are a couple of comments that are done but not marked accordingly.
I agree with Artem, if we could craft code that fails due to not calling ctors, we should probably include them in the tests, even if they don't reflect the desired behavior they are a great source of documentation what is missing.

Jun 17 2021, 3:57 PM · Restricted Project

Jun 7 2021

xazax.hun added a comment to D103750: [analyzer] Handle std::make_unique for SmartPtrModeling.

Whoops, I totally missed your point with my suggestion (should not read it while sitting at meetings). But Artem has a great answer already.

Jun 7 2021, 12:52 PM · Restricted Project
xazax.hun added a comment to D103750: [analyzer] Handle std::make_unique for SmartPtrModeling.

Ugh, this entire checkBind hack was so unexpected that I didn't even recognize evalCall. What prevents you from doing everything in evalCall? No state traits, no nothing, just directly take the this-region and attach the value to it?

Because in evalCall, I don't have access to the ThisRegion. At least I think I don't.

Jun 7 2021, 12:38 PM · Restricted Project

Jun 6 2021

xazax.hun added a comment to D103750: [analyzer] Handle std::make_unique for SmartPtrModeling.

Since we have CallExpr, we can easily conjure up an SVal. But I don't see how I can do it similarly in this patch.

Jun 6 2021, 10:01 AM · Restricted Project
xazax.hun added a comment to D103750: [analyzer] Handle std::make_unique for SmartPtrModeling.

I am not being able to use this info since I don't have access to the raw pointer, so cannot create a SVal and then constrain the SVal to non-null.
Any suggestions @NoQ, @vsavchenko , @xazax.hun, @teemperor?

Jun 6 2021, 8:42 AM · Restricted Project

Jun 4 2021

xazax.hun added inline comments to D103605: [analyzer] Introduce a new interface for tracking.
Jun 4 2021, 3:58 PM · Restricted Project
xazax.hun added inline comments to D103605: [analyzer] Introduce a new interface for tracking.
Jun 4 2021, 12:44 PM · Restricted Project
xazax.hun added a comment to D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator.

I was wondering, if we could try something new with the tests. To increase our confidence that the expected behavior is correct, how about including a Z3 proof with each of the test cases?

Jun 4 2021, 11:38 AM · Restricted Project

Jun 1 2021

xazax.hun added inline comments to D103434: [analyzer] Allow visitors to run callbacks on completion.
Jun 1 2021, 9:02 PM · Restricted Project
xazax.hun added inline comments to D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator.
Jun 1 2021, 8:45 PM · Restricted Project

May 4 2021

xazax.hun added inline comments to D96215: [clang-tidy] Aliasing: Add support for lambda captures..
May 4 2021, 1:58 PM · Restricted Project

May 3 2021

xazax.hun added a comment to D96215: [clang-tidy] Aliasing: Add support for lambda captures..

Don't mind my previous comment :) I missed the conversation about function by-ref arguments. :)

May 3 2021, 5:09 PM · Restricted Project
xazax.hun added a comment to D96215: [clang-tidy] Aliasing: Add support for lambda captures..

I'm arguing that it should scan for lambda captures by reference as well.

May 3 2021, 5:08 PM · Restricted Project
xazax.hun added inline comments to D101788: [AST] AnyCall: Implement arguments()..
May 3 2021, 5:06 PM

Feb 27 2021

xazax.hun committed rGdd6738d93de1: [clang][Lifetimes] Fix false positive warning from BUG 49342 (authored by xazax.hun).
[clang][Lifetimes] Fix false positive warning from BUG 49342
Feb 27 2021, 8:16 AM
xazax.hun closed D97605: [Lifetimes] Fix false positive warning from BUG 49342 .
Feb 27 2021, 8:16 AM · Restricted Project

Feb 26 2021

xazax.hun requested review of D97605: [Lifetimes] Fix false positive warning from BUG 49342 .
Feb 26 2021, 6:59 PM · Restricted Project

Feb 23 2021

xazax.hun accepted D96570: [scan-build-py] Add sarif-html support in scan-build-py.

It would be nice, if you could also open a PR for the github version: https://github.com/rizsotto/scan-build

Feb 23 2021, 7:20 AM · Restricted Project

Jan 14 2021

xazax.hun added a comment to D93224: [analyzer] Use the MacroExpansionContext for macro expansions in plists.

Do you think it's acceptable?
@xazax.hun @NoQ

Jan 14 2021, 4:05 AM · Restricted Project

Jan 13 2021

xazax.hun added a comment to D93224: [analyzer] Use the MacroExpansionContext for macro expansions in plists.

Do we really promise ABI compatibility for AST dumps? If we support it to some extent, then we would have a problem - which would mean that we can not target clang-12 anymore with this patch stack.

Jan 13 2021, 3:53 AM · Restricted Project

Jan 12 2021

xazax.hun added a comment to D93224: [analyzer] Use the MacroExpansionContext for macro expansions in plists.

How should I continue to get this working with CTU?

Jan 12 2021, 9:59 AM · Restricted Project
xazax.hun added inline comments to D94476: [analyzer] Implement conversion from Clang diagnostics to PathDiagnostics..
Jan 12 2021, 7:52 AM · Restricted Project

Dec 16 2020

xazax.hun added inline comments to D93110: [analyzer] Implement fine-grained suppressions via attributes.
Dec 16 2020, 7:19 AM · Restricted Project
xazax.hun added inline comments to D93222: [analyzer] Introduce MacroExpansionContext to libAnalysis.
Dec 16 2020, 4:23 AM · Restricted Project
xazax.hun added inline comments to D93222: [analyzer] Introduce MacroExpansionContext to libAnalysis.
Dec 16 2020, 3:22 AM · Restricted Project

Dec 15 2020

xazax.hun accepted D93224: [analyzer] Use the MacroExpansionContext for macro expansions in plists.

Yay! Deleting code is always nice.

Dec 15 2020, 5:23 AM · Restricted Project
xazax.hun added inline comments to D93223: [analyzer] Create MacroExpansionContext member in AnalysisConsumer.
Dec 15 2020, 5:21 AM · Restricted Project
xazax.hun added a comment to D93222: [analyzer] Introduce MacroExpansionContext to libAnalysis.

Overall looks good to me, I have some minor nits and questions inline.

Dec 15 2020, 5:16 AM · Restricted Project

Dec 2 2020

xazax.hun accepted D91902: [analyzer] Ignore annotations if func is inlined..

LGTM, thanks!

Dec 2 2020, 3:49 AM · Restricted Project
xazax.hun accepted D92432: [analyzer] Add a thin abstraction layer between libCrossTU and libAnalysis..

LGTM!

Dec 2 2020, 3:47 AM · Restricted Project

Nov 26 2020

xazax.hun requested changes to D91902: [analyzer] Ignore annotations if func is inlined..
Nov 26 2020, 3:03 AM · Restricted Project
xazax.hun added a comment to D91902: [analyzer] Ignore annotations if func is inlined..

Thanks for working on this check! Please add the [analyzer] tag to the title of these patches.

Nov 26 2020, 3:03 AM · Restricted Project

Nov 21 2020

xazax.hun accepted D91223: Support struct annotations in FuchsiaHandleChecker..

LGTM!

Nov 21 2020, 10:20 AM · Restricted Project

Nov 19 2020

xazax.hun accepted D91223: Support struct annotations in FuchsiaHandleChecker..

Overall looks good, but please resolve the two nits before commiting.

Nov 19 2020, 9:03 PM · Restricted Project
xazax.hun added a comment to D91223: Support struct annotations in FuchsiaHandleChecker..

I think I might have an idea of what is going on. The handles are released in a PostCall. This is intended, as the handles are in the released state AFTER the call. When you call an unknown function with a pointer, that function is free to modify the contents of the pointer. Since the analyzer has no knowledge about the body of the function, it will do a conservative evaluation, escape the symbols in the struct, and create new symbols. This is why new symbols might be introduced. I think you could subscribe to escapes and check if you access the old symbols there. If that is the case and the escape is the result of calling an annotated function, maybe you can correctly mark those symbols as deleted.

Nov 19 2020, 6:48 AM · Restricted Project

Nov 18 2020

xazax.hun added a comment to D91223: Support struct annotations in FuchsiaHandleChecker..

I also have some questions:

  1. This patch does not work for case where the structure is passed in as pointer. The structure becomes lazycompoundval and I could not find the symbol there. Do you know what is going on?
Nov 18 2020, 2:59 AM · Restricted Project

Nov 16 2020

xazax.hun added inline comments to D91223: Support struct annotations in FuchsiaHandleChecker..
Nov 16 2020, 2:30 AM · Restricted Project
xazax.hun added a comment to D91223: Support struct annotations in FuchsiaHandleChecker..

I have a question about pointer members and I'd like to see some tests added. Otherwise, I like the direction.

Where should i add the tests?

Nov 16 2020, 2:28 AM · Restricted Project

Nov 13 2020

xazax.hun requested changes to D91223: Support struct annotations in FuchsiaHandleChecker..

I have a question about pointer members and I'd like to see some tests added. Otherwise, I like the direction.

Nov 13 2020, 7:17 AM · Restricted Project
xazax.hun updated the summary of D91223: Support struct annotations in FuchsiaHandleChecker..
Nov 13 2020, 7:05 AM · Restricted Project

Nov 2 2020

xazax.hun added a comment to D90362: scan-build supprot relative 'file' in cdb..

What's the plan regarding updating scan-build-py to match the upstream? It seems like this issue has already been address in the upstream version.

Nov 2 2020, 1:36 PM · Restricted Project

Oct 29 2020

xazax.hun added a comment to D90362: scan-build supprot relative 'file' in cdb..

I know that the current situation is a mess, but there is an alternative version of scan-build-py on Github, which is also distributed on pypi. Could you check if that version is also susceptible to this problem and open a pull request for the author in case it is?

Oct 29 2020, 2:36 AM · Restricted Project

Sep 11 2020

xazax.hun added inline comments to D87519: [analyzer][Liveness][NFC] Enqueue the CFGBlocks post-order.
Sep 11 2020, 11:10 AM · Restricted Project
xazax.hun added inline comments to D87518: [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that appear in an assignment.
Sep 11 2020, 10:54 AM · Restricted Project
xazax.hun accepted D87518: [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that appear in an assignment.

LGTM! Looks a lot cleaner this way.

Sep 11 2020, 10:52 AM · Restricted Project
xazax.hun added inline comments to D87518: [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that appear in an assignment.
Sep 11 2020, 10:51 AM · Restricted Project
xazax.hun added inline comments to D87518: [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that appear in an assignment.
Sep 11 2020, 10:50 AM · Restricted Project
xazax.hun accepted D82598: [analyzer][Liveness][NFC] Get rid of statement liveness, because such a thing doesn't exist.

So now all of the dependencies are landed and this should be ready for its prime time, right?

Sep 11 2020, 10:34 AM · Restricted Project

Aug 31 2020

xazax.hun accepted D86027: [analyzer] Add bool operator modeling for unque_ptr.

LG! Thanks!

Aug 31 2020, 10:05 AM · Restricted Project
xazax.hun added inline comments to D86027: [analyzer] Add bool operator modeling for unque_ptr.
Aug 31 2020, 3:09 AM · Restricted Project

Aug 24 2020

xazax.hun accepted D86446: [analyzer][docs][NFC] Document the ento namespace in the llvm/Lexicon.

LGTM with a nit.

Aug 24 2020, 7:37 AM · Restricted Project
xazax.hun added a comment to D86135: [analyzer][MacroExpansion] Fix a crash where multiple parameters resolved to __VA_ARGS__.

Is this related to https://bugs.llvm.org/show_bug.cgi?id=44493?

Aug 24 2020, 7:33 AM · Restricted Project

Aug 22 2020

xazax.hun added a comment to D85528: [analyzer] Fix cast evaluation on scoped enums in ExprEngine.

It would be nice to have this fix in clang11.
Do you think it's qualified for it?

Aug 22 2020, 10:42 AM · Restricted Project
xazax.hun added inline comments to D86293: [analyzer] Add modeling of Eq operator in smart ptr.
Aug 22 2020, 9:13 AM · Restricted Project
xazax.hun requested changes to D86027: [analyzer] Add bool operator modeling for unque_ptr.

Please add a test case, where the unique_ptr is initialized from a pointer parameter that has no assumptions. I think that case is not handled correctly.

Aug 22 2020, 9:01 AM · Restricted Project
xazax.hun added inline comments to D86223: [analyzer][z3] Use more elaborate Z3 variable names.
Aug 22 2020, 8:44 AM · Restricted Project
xazax.hun accepted D86223: [analyzer][z3] Use more elaborate Z3 variable names.

This is what I had in mind, thanks!

Aug 22 2020, 8:43 AM · Restricted Project

Aug 21 2020

xazax.hun accepted D86334: [analyzer] Remove redundant output errs.

LGTM, thanks!

Aug 21 2020, 2:19 AM · Restricted Project

Aug 20 2020

xazax.hun added a comment to D86223: [analyzer][z3] Use more elaborate Z3 variable names.

I wanted to conditionally, aka. in debug configuration override the base implementation of the SymbolData::getKindStr

Aug 20 2020, 10:11 AM · Restricted Project
xazax.hun added a comment to D86295: [analyzer] Reorder the layout of MemRegion and cache by hand for optimal size.

MemRegion is a popular class to instantiate in the analyzer so it looks good to me.
But unless you add a comment one will probably replace the offset with an optional as the part of a refactoring.

Aug 20 2020, 9:22 AM · Restricted Project
xazax.hun added a comment to D86223: [analyzer][z3] Use more elaborate Z3 variable names.

Eh, I'm not sure if it worth it to put these into virtual functions - as conditionally overriding functions is not really a good idea.

Aug 20 2020, 9:17 AM · Restricted Project

Aug 19 2020

xazax.hun added a comment to D86223: [analyzer][z3] Use more elaborate Z3 variable names.

Exactly, but you could return a StringRef to static storage.

Aug 19 2020, 12:22 PM · Restricted Project