Page MenuHomePhabricator

baloghadamsoftware (Balogh, Ádám)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 9 2016, 4:07 AM (231 w, 9 h)

Recent Activity

Today

baloghadamsoftware added inline comments to D81272: [clang-tidy] New check `misc-redundant-condition`.
Wed, Aug 12, 8:16 AM · Restricted Project, Restricted Project
baloghadamsoftware added inline comments to D85728: [Analyzer] Support for the new variadic isa<> and isa_and_not_null<> in CastValueChecker.
Wed, Aug 12, 5:19 AM · Restricted Project
baloghadamsoftware updated the diff for D85728: [Analyzer] Support for the new variadic isa<> and isa_and_not_null<> in CastValueChecker.

Updated according to the comments.

Wed, Aug 12, 5:16 AM · Restricted Project
baloghadamsoftware added inline comments to D85752: [Analyzer] Store the pointed/referenced type for dynamic casts.
Wed, Aug 12, 4:28 AM · Restricted Project
baloghadamsoftware updated the summary of D85752: [Analyzer] Store the pointed/referenced type for dynamic casts.
Wed, Aug 12, 4:25 AM · Restricted Project
baloghadamsoftware updated the diff for D85752: [Analyzer] Store the pointed/referenced type for dynamic casts.

Updated according to the comments.

Wed, Aug 12, 4:24 AM · Restricted Project

Yesterday

baloghadamsoftware updated the diff for D85728: [Analyzer] Support for the new variadic isa<> and isa_and_not_null<> in CastValueChecker.

Working version. Debug printouts removed.

Tue, Aug 11, 9:54 AM · Restricted Project
baloghadamsoftware requested review of D85752: [Analyzer] Store the pointed/referenced type for dynamic casts.
Tue, Aug 11, 9:52 AM · Restricted Project
baloghadamsoftware retitled D85728: [Analyzer] Support for the new variadic isa<> and isa_and_not_null<> in CastValueChecker from [Analyzer][WIP] Support for the new variadic isa<> and isa_and_nod_null<> in CastValueChecker to [Analyzer][WIP] Support for the new variadic isa<> and isa_and_not_null<> in CastValueChecker.
Tue, Aug 11, 6:41 AM · Restricted Project
baloghadamsoftware added a comment to D85728: [Analyzer] Support for the new variadic isa<> and isa_and_not_null<> in CastValueChecker.

My proposal is the following: do not store the casing info between pointers and references but the underlying types themselves. There are two ways to implement this: in the checkers using it (currently only this one) or behind the API of DynamicCastInfo. Maybe the latter is more appropriate.

Tue, Aug 11, 6:39 AM · Restricted Project
baloghadamsoftware added a comment to D85728: [Analyzer] Support for the new variadic isa<> and isa_and_not_null<> in CastValueChecker.

This patch intends to fix bug 47037. It is still work in progress with lots of debug printouts.

Tue, Aug 11, 6:30 AM · Restricted Project
baloghadamsoftware requested review of D85728: [Analyzer] Support for the new variadic isa<> and isa_and_not_null<> in CastValueChecker.
Tue, Aug 11, 6:28 AM · Restricted Project
baloghadamsoftware added a comment to D81272: [clang-tidy] New check `misc-redundant-condition`.

6 findings in the LLVM Project. All of them confirmed as trues positives, 5 of them already fixed. Fix pending for the last one.

Tue, Aug 11, 1:13 AM · Restricted Project, Restricted Project
baloghadamsoftware added a comment to D82557: [MSP430][NFC] Remove redundant condition.

Ping. @asl?

Tue, Aug 11, 1:07 AM · Restricted Project

Sun, Aug 9

baloghadamsoftware added a comment to D85424: [Analyzer] Crash fix for alpha.cplusplus.IteratorRange.
In D85424#2203329, @NoQ wrote:

Tests? (edit: ok, i see, you have trouble reducing the test. yes, we absolutely need a test, please finish with creduce/delta.)

Sun, Aug 9, 11:04 PM · Restricted Project

Thu, Aug 6

baloghadamsoftware added a comment to D85424: [Analyzer] Crash fix for alpha.cplusplus.IteratorRange.

Unfortunately, I could not create test for it. It is extremely rare that the Analyzer creates an UndefinedVal. I had the following output:

1.	<eof> parser at end of file
2.	While analyzing stack: 
	#0 Calling llvm::object::BindRebaseSegInfo::BindRebaseSegInfo at line /usr/include/c++/7/bits/unique_ptr.h:821:34
	#1 Calling std::make_unique at line 4094
	#2 Calling llvm::object::MachOObjectFile::bindTable at line 4115
	#3 Calling llvm::object::MachOObjectFile::weakBindTable
3.	/home/edmbalo/llvm-project/llvm/lib/Object/MachOObjectFile.cpp:4004:28: Error evaluating statement
4.	/home/edmbalo/llvm-project/llvm/lib/Object/MachOObjectFile.cpp:4004:28: Error evaluating statement

I was analyzing llvm/lib/Object/MachOObjectFile.cpp with all the iterator-related checkers enabled.

Thu, Aug 6, 4:49 AM · Restricted Project
baloghadamsoftware requested review of D85424: [Analyzer] Crash fix for alpha.cplusplus.IteratorRange.
Thu, Aug 6, 4:45 AM · Restricted Project

Wed, Aug 5

baloghadamsoftware requested review of D85351: [Analyzer] Fix for `ExprEngine::computeObjectUnderConstruction()` for base and delegating consturctor initializers.
Wed, Aug 5, 12:45 PM · Restricted Project

Tue, Aug 4

baloghadamsoftware updated the diff for D76590: [Analyzer] Model `empty()` member function of containers.

Minor fix.

Tue, Aug 4, 7:11 AM · Restricted Project
baloghadamsoftware updated the diff for D76590: [Analyzer] Model `empty()` member function of containers.

Updated according to the comments.

Tue, Aug 4, 7:05 AM · Restricted Project
baloghadamsoftware added inline comments to D76590: [Analyzer] Model `empty()` member function of containers.
Tue, Aug 4, 6:55 AM · Restricted Project
baloghadamsoftware updated the diff for D77229: [Analyzer] Avoid handling of LazyCompundVals in IteratorModeling.

else branch merged with inner if.

Tue, Aug 4, 5:34 AM · Restricted Project

Mon, Aug 3

baloghadamsoftware updated the diff for D76604: [Analyzer] Model `size()` member function of containers.

Rebased.

Mon, Aug 3, 10:31 AM · Restricted Project
baloghadamsoftware updated the diff for D77150: [Analyzer] New Option for ContainerModeling: AggressiveEraseModeling.

Option made hidden. However, I think we should create a category "advanced" for options which affect the internal modeling. Our users are programmers and the advanced among them should see this option (and others similar to this one).

Mon, Aug 3, 9:11 AM · Restricted Project
baloghadamsoftware added a comment to D83190: [analyzer] Model iterator random incrementation symmetrically.

I experienced 2 crashes with and without this patch using commit 1af9fc82132da7c876e8f70c4e986cc9c59010ee on master:
I have used the clang built on that revision to analyse itself, and also used the patched version (with this current revision applied) to do the same.

Mon, Aug 3, 8:00 AM · Restricted Project
baloghadamsoftware updated the diff for D77229: [Analyzer] Avoid handling of LazyCompundVals in IteratorModeling.

Crash Fix: do not retrieve first iterator argument in advance. (It may happen that although argument count is more than zero, there is no argument at all.)

Mon, Aug 3, 7:58 AM · Restricted Project

Fri, Jul 17

baloghadamsoftware updated the diff for D76590: [Analyzer] Model `empty()` member function of containers.

Rebased, updated.

Fri, Jul 17, 10:17 AM · Restricted Project
baloghadamsoftware accepted D83190: [analyzer] Model iterator random incrementation symmetrically.

Looks good, aside from the few naming issues I mentioned. Please try it on LLVM/Clang before committing it to avoid unexpected crashes.

Fri, Jul 17, 9:52 AM · Restricted Project

Thu, Jul 16

baloghadamsoftware updated the diff for D75677: [Analyzer] Only add iterator note tags to the operations of the affected iterators.

Rebased, no tricks with LazyCompoundVals are used anymore.

Thu, Jul 16, 12:24 PM · Restricted Project
baloghadamsoftware added inline comments to D74541: [Analyzer] Use note tags to track iterator increments and decrements.
Thu, Jul 16, 12:23 PM · Restricted Project
baloghadamsoftware updated the diff for D74541: [Analyzer] Use note tags to track iterator increments and decrements.

Rebased.

Thu, Jul 16, 12:22 PM · Restricted Project
baloghadamsoftware committed rGa59d4ae4313c: [Analyzer] Hotfix for various crashes in iterator checkers (authored by baloghadamsoftware).
[Analyzer] Hotfix for various crashes in iterator checkers
Thu, Jul 16, 11:51 AM
baloghadamsoftware closed D83295: [Analyzer] Hotfix for various crashes in iterator checkers.
Thu, Jul 16, 11:50 AM · Restricted Project
baloghadamsoftware added a comment to D77150: [Analyzer] New Option for ContainerModeling: AggressiveEraseModeling.

Now I made some measurements about the false positives this option adds.

Thu, Jul 16, 3:10 AM · Restricted Project
baloghadamsoftware updated the diff for D77150: [Analyzer] New Option for ContainerModeling: AggressiveEraseModeling.

Rebased.

Thu, Jul 16, 1:35 AM · Restricted Project
baloghadamsoftware updated the diff for D77125: [Analyzer] Model return values of container insert and delete operations.

Protection agains Unknown return values added.

Thu, Jul 16, 1:33 AM · Restricted Project
baloghadamsoftware updated the diff for D83295: [Analyzer] Hotfix for various crashes in iterator checkers.

Protection against Unknown added for pointer increments and decrements. No more crashes on LLVM/Clang.

Thu, Jul 16, 1:31 AM · Restricted Project

Tue, Jul 14

Artem Dergachev <adergachev@apple.com> committed rG8595655fa43f: [Analyzer][NFC] Change parameter of NoteTag lambdas to PathSensitiveBugReport (authored by baloghadamsoftware).
[Analyzer][NFC] Change parameter of NoteTag lambdas to PathSensitiveBugReport
Tue, Jul 14, 4:40 PM
Artem Dergachev <adergachev@apple.com> committed rGe08513cb2d83: [Analyzer] Mark constant member functions const in CheckerManager (authored by baloghadamsoftware).
[Analyzer] Mark constant member functions const in CheckerManager
Tue, Jul 14, 4:40 PM
baloghadamsoftware added a comment to D77150: [Analyzer] New Option for ContainerModeling: AggressiveEraseModeling.

I am trying to measure the amount of extra false positive on real code (not artificial examples) of this option. The modeling of container size may reduce it, of course, but we have no other option to find this bug: even loop-unrolling or loop-widening is not be able to recognize the last before the last iteration of a loop. I cannot imagine any solution to recognize it, this really sounds like voice recognition in the 80's as @NoQ wrote. I do not expect such thing in the next 10 years. Refining and enhancing container modeling is expected to reduce false positives generally in the iterator checkers and will eventually result in moving them out of alpha state.

Tue, Jul 14, 4:33 AM · Restricted Project

Jul 13 2020

baloghadamsoftware updated the diff for D83295: [Analyzer] Hotfix for various crashes in iterator checkers.

Two more crashes detected, fixes for them added.

Jul 13 2020, 1:05 AM · Restricted Project

Jul 9 2020

baloghadamsoftware added inline comments to D83295: [Analyzer] Hotfix for various crashes in iterator checkers.
Jul 9 2020, 7:21 AM · Restricted Project
baloghadamsoftware updated the diff for D83295: [Analyzer] Hotfix for various crashes in iterator checkers.

Test added for the third fix in this patch.

Jul 9 2020, 3:13 AM · Restricted Project

Jul 7 2020

Herald added a reviewer for D83295: [Analyzer] Hotfix for various crashes in iterator checkers: Szelethus.
Jul 7 2020, 4:45 AM · Restricted Project

Jul 6 2020

baloghadamsoftware added a comment to D83190: [analyzer] Model iterator random incrementation symmetrically.

Nice work, but please implement this feature also for non-pointer iterators for the matter of consistence.

Jul 6 2020, 4:23 AM · Restricted Project

Jul 3 2020

baloghadamsoftware accepted D82585: [analyzer][NFC] Move the data structures from CheckerRegistry to the Core library.

It looks OK.

Jul 3 2020, 9:06 AM · Restricted Project
baloghadamsoftware added reviewers for D77125: [Analyzer] Model return values of container insert and delete operations: gamesh411, martong, balazske.
Jul 3 2020, 9:06 AM · Restricted Project
baloghadamsoftware updated the diff for D77150: [Analyzer] New Option for ContainerModeling: AggressiveEraseModeling.

Rebased. Tests added. Fixed to work on std::vector-like and std::deque-like containers as well.

Jul 3 2020, 9:06 AM · Restricted Project
baloghadamsoftware updated the diff for D77125: [Analyzer] Model return values of container insert and delete operations.

Rebased.

Jul 3 2020, 9:06 AM · Restricted Project
baloghadamsoftware added inline comments to D82585: [analyzer][NFC] Move the data structures from CheckerRegistry to the Core library.
Jul 3 2020, 5:53 AM · Restricted Project
baloghadamsoftware added inline comments to D83115: [Analyzer] Report every bug if only uniqueing location differs..
Jul 3 2020, 3:12 AM · Restricted Project

Jul 2 2020

baloghadamsoftware added a comment to D71199: [clang-tidy] New check cppcoreguidelines-prefer-member-initializer.

Just my 2 cents, but would it not be wise to introduce a test case that runs the 2 aforementioned checks together demonstrating how they interact with each other. This will also force compliance if either check is updated down the line.

Jul 2 2020, 1:01 AM · Restricted Project, Restricted Project

Jul 1 2020

baloghadamsoftware committed rGc79745ed48f3: [Analyzer] Quick fix for broken tests on Windows (authored by baloghadamsoftware).
[Analyzer] Quick fix for broken tests on Windows
Jul 1 2020, 4:17 AM
baloghadamsoftware added inline comments to D77150: [Analyzer] New Option for ContainerModeling: AggressiveEraseModeling.
Jul 1 2020, 4:17 AM · Restricted Project
baloghadamsoftware added a comment to D82185: [Analyzer] Handle pointer implemented as iterators in iterator checkers.

This (or a follow-up) broke tests on windows: http://45.33.8.238/win/18877/step_7.txt

Please take a look and revert for now if it takes a while to fix.

Jul 1 2020, 4:17 AM · Restricted Project
baloghadamsoftware updated the diff for D77229: [Analyzer] Avoid handling of LazyCompundVals in IteratorModeling.

Rebased on master which now contains the handling of pointers as iterators. All tests passed.

Jul 1 2020, 3:44 AM · Restricted Project
baloghadamsoftware committed rG9e63b190af76: [Analyzer] Handle pointer implemented as iterators in iterator checkers (authored by baloghadamsoftware).
[Analyzer] Handle pointer implemented as iterators in iterator checkers
Jul 1 2020, 12:30 AM
baloghadamsoftware committed rG40c50bdee443: [Sema][NFC] Remove Redundant Condition (authored by baloghadamsoftware).
[Sema][NFC] Remove Redundant Condition
Jul 1 2020, 12:30 AM
baloghadamsoftware committed rG4da65c2920b6: [clang-tidy] New util `Aliasing` factored out from `bugprone-infinite-loop` (authored by baloghadamsoftware).
[clang-tidy] New util `Aliasing` factored out from `bugprone-infinite-loop`
Jul 1 2020, 12:30 AM
baloghadamsoftware committed rGea563daae523: [Analyzer] Fix errors in iterator modeling (authored by baloghadamsoftware).
[Analyzer] Fix errors in iterator modeling
Jul 1 2020, 12:30 AM
baloghadamsoftware closed D82185: [Analyzer] Handle pointer implemented as iterators in iterator checkers.
Jul 1 2020, 12:30 AM · Restricted Project
baloghadamsoftware closed D82563: [Sema][NFC] Remove Redundant Condition.
Jul 1 2020, 12:30 AM · Restricted Project
baloghadamsoftware closed D82385: [Analyzer] Fix errors in iterator modeling.
Jul 1 2020, 12:30 AM · Restricted Project
baloghadamsoftware closed D81396: [clang-tidy] New util `Aliasing` factored out from `bugprone-infinite-loop`.
Jul 1 2020, 12:30 AM · Restricted Project, Restricted Project
baloghadamsoftware committed rGff2d09148c91: [LLDB][Clang Integration][NFC] Remove redundant condition (authored by baloghadamsoftware).
[LLDB][Clang Integration][NFC] Remove redundant condition
Jul 1 2020, 12:30 AM
baloghadamsoftware committed rG1b2d2d70e1ec: [LLDB][NFC] Remove redundant condition (authored by baloghadamsoftware).
[LLDB][NFC] Remove redundant condition
Jul 1 2020, 12:30 AM
baloghadamsoftware committed rGec5ba353fab7: [Hexagon][NFC] Remove redundant condition (authored by baloghadamsoftware).
[Hexagon][NFC] Remove redundant condition
Jul 1 2020, 12:30 AM
baloghadamsoftware committed rG71c6a36018dd: [AMDGPU][NFC] Remove redundant condition (authored by baloghadamsoftware).
[AMDGPU][NFC] Remove redundant condition
Jul 1 2020, 12:30 AM
baloghadamsoftware closed D82558: [LLDB][NFC] Remove redundant condition.
Jul 1 2020, 12:29 AM · Restricted Project
baloghadamsoftware closed D82559: [LLDB][Clang Integration][NFC] Remove redundant condition.
Jul 1 2020, 12:29 AM · Restricted Project
baloghadamsoftware closed D82555: [AMDGPU][NFC] Remove redundant condition.
Jul 1 2020, 12:29 AM · Restricted Project, Restricted Project
baloghadamsoftware closed D82556: [Hexagon][NFC] Remove redundant condition.
Jul 1 2020, 12:29 AM · Restricted Project

Jun 30 2020

baloghadamsoftware added a comment to D82845: [Analyzer][StreamChecker] Report every leak, clean up state..

I checked it with simple debug print, the LeakedSyms will contain 2 items with different StreamOpenNode. So I think these should be independent problem reports for the bug reporter.

Jun 30 2020, 10:18 AM · Restricted Project
baloghadamsoftware added inline comments to D79431: [analyzer] StdLibraryFunctionsChecker: Add better diagnostics.
Jun 30 2020, 8:06 AM · Restricted Project
baloghadamsoftware added a comment to D79431: [analyzer] StdLibraryFunctionsChecker: Add better diagnostics.

Sure, this is an improvement because we display more information, but I'd argue that it isn't really a more readable warning message :) How about

<argno>th argument to the call to <function name>

  • cannot be represented with a character
  • is a null pointer
  • ...

, which violates the function's preconditions.

WDYT?

Jun 30 2020, 8:06 AM · Restricted Project
baloghadamsoftware accepted D81761: [analyzer] Force dependency checkers to be hidden.

Now it looks good to me.

Jun 30 2020, 8:06 AM · Restricted Project
baloghadamsoftware added a comment to D81272: [clang-tidy] New check `misc-redundant-condition`.

True positive confirmed in PostGreS: Mailing List Archive. It is fixed by now, so you cannot see it on the link in my previous comment anymore.

Jun 30 2020, 7:34 AM · Restricted Project, Restricted Project
baloghadamsoftware added a comment to D82557: [MSP430][NFC] Remove redundant condition.

Is it OK now, @asl?

Jun 30 2020, 7:34 AM · Restricted Project
baloghadamsoftware requested changes to D80505: [analyzer] CERT STR rule checkers: STR51-CPP.
Jun 30 2020, 5:23 AM · Restricted Project
baloghadamsoftware added a comment to D81761: [analyzer] Force dependency checkers to be hidden.

My observation is, if there is an example checker, it should be really "example" and not "test". (The "custom" is probably good to rename to "test" but not the "example".) (The names of these files look not good too: A CheckerOptionHandling.cpp contains an example checker, should be probably CheckerOptionHandlingExample.cpp).

That is indeed a very fair point. My rationale was that these examples are in fact tested in the lit files, and my intention when writing them was to test checker registration from plugins.

Jun 30 2020, 4:51 AM · Restricted Project

Jun 29 2020

baloghadamsoftware requested changes to D71155: [analyzer] CERT STR rule checkers: STR30-C.
Jun 29 2020, 9:42 AM · Restricted Project
baloghadamsoftware requested changes to D71033: [analyzer] CERT STR rule checkers: STR32-C.
Jun 29 2020, 9:42 AM · Restricted Project
baloghadamsoftware requested changes to D70411: [analyzer] CERT STR rule checkers: STR31-C.
Jun 29 2020, 8:03 AM · Restricted Project

Jun 26 2020

baloghadamsoftware added a reviewer for D80505: [analyzer] CERT STR rule checkers: STR51-CPP: baloghadamsoftware.
Jun 26 2020, 7:03 AM · Restricted Project
baloghadamsoftware added inline comments to D80505: [analyzer] CERT STR rule checkers: STR51-CPP.
Jun 26 2020, 6:31 AM · Restricted Project
baloghadamsoftware requested changes to D80504: [analyzer] CERT STR rule checkers: STR50-CPP.

Why limiting the checker to std::cin?

Jun 26 2020, 6:30 AM · Restricted Project
baloghadamsoftware added inline comments to D82557: [MSP430][NFC] Remove redundant condition.
Jun 26 2020, 5:56 AM · Restricted Project
baloghadamsoftware updated the diff for D82557: [MSP430][NFC] Remove redundant condition.

Misleading comment deleted together with the last commented-out line.

Jun 26 2020, 5:56 AM · Restricted Project
baloghadamsoftware added inline comments to D70411: [analyzer] CERT STR rule checkers: STR31-C.
Jun 26 2020, 5:24 AM · Restricted Project
baloghadamsoftware added inline comments to D70411: [analyzer] CERT STR rule checkers: STR31-C.
Jun 26 2020, 5:24 AM · Restricted Project
baloghadamsoftware added inline comments to D82557: [MSP430][NFC] Remove redundant condition.
Jun 26 2020, 4:18 AM · Restricted Project
baloghadamsoftware updated the diff for D82557: [MSP430][NFC] Remove redundant condition.

Removed commented-out lines.

Jun 26 2020, 4:18 AM · Restricted Project

Jun 25 2020

baloghadamsoftware created D82563: [Sema][NFC] Remove Redundant Condition.
Jun 25 2020, 8:33 AM · Restricted Project
baloghadamsoftware created D82559: [LLDB][Clang Integration][NFC] Remove redundant condition.
Jun 25 2020, 8:33 AM · Restricted Project
baloghadamsoftware created D82558: [LLDB][NFC] Remove redundant condition.
Jun 25 2020, 8:02 AM · Restricted Project
baloghadamsoftware created D82557: [MSP430][NFC] Remove redundant condition.
Jun 25 2020, 8:00 AM · Restricted Project
baloghadamsoftware created D82556: [Hexagon][NFC] Remove redundant condition.
Jun 25 2020, 8:00 AM · Restricted Project
baloghadamsoftware added a reviewer for D82555: [AMDGPU][NFC] Remove redundant condition: tstellar.
Jun 25 2020, 8:00 AM · Restricted Project, Restricted Project
baloghadamsoftware created D82555: [AMDGPU][NFC] Remove redundant condition.
Jun 25 2020, 8:00 AM · Restricted Project, Restricted Project

Jun 24 2020

baloghadamsoftware added a comment to D81272: [clang-tidy] New check `misc-redundant-condition`.

I tested this check on several open-source projects: BitCoin, CURL, OpenSSL, PostGreS/, TMux/ and Xerces. I only got two warnings issued by this checker, the first one in BitCoin:

src/checkqueue.h:93:25: redundant condition 'fMaster' [misc-redundant-condition]
                        if (fMaster)
                        ^

And indeed, this was a true positive that is fixed by now by this Commit. (I do not update these projects very often since I only use them for testing checks.)

Jun 24 2020, 9:09 AM · Restricted Project, Restricted Project