Page MenuHomePhabricator

steakhal (Balázs Benics)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 7 2019, 1:49 AM (109 w, 3 d)

Recent Activity

Thu, Apr 8

steakhal added a comment to D99260: [analyzer] Fix false positives in inner pointer checker (PR49628).

I'm still not satisfied with the addressof, but I won't block this either.

Thu, Apr 8, 9:52 AM · Restricted Project

Wed, Apr 7

steakhal accepted D99262: [analyzer] Fix dead store checker false positive.

Looks good. Thank you.

Wed, Apr 7, 6:14 AM · Restricted Project
steakhal abandoned D99658: [analyzer] Fix clang_analyzer_getExtent for heap regions.
In D99658#2671747, @NoQ wrote:

I mean, the extent of an ElementRegion is the size of a single element. The reason why our intrinsic isn't doing what you expect is because we represent the pointer with offset as ElementRegion regardless of whether operator [] was used. On the other hand, an SVal doesn't ever represent a region at all, it only points to its first byte, regardless of the structure of MemRegion inside it; for that reason clang_analyzer_getExtent() is impossible to implement correctly in our current model.

So i think both behaviors are incorrect but if you think it makes it easier to write tests then absolutely go for it!

Oh, I got it. Hm, yes, both are wrong xD

Wed, Apr 7, 4:06 AM · Restricted Project

Tue, Apr 6

steakhal abandoned D99659: [analyzer][taint] Extent of heap regions should get taint sometimes.

Obsoleted by D69726.

Tue, Apr 6, 9:14 AM · Restricted Project
steakhal requested review of D99959: [analyzer][NFC] Add tests for extents.
Tue, Apr 6, 8:00 AM · Restricted Project
steakhal added a comment to D99658: [analyzer] Fix clang_analyzer_getExtent for heap regions.
In D99658#2665730, @NoQ wrote:

What about clang_analyzer_getExtent(&x[2]) then?

I guess (extent of heap segment that starts at symbol of type 'int *' conjured at statement 'new int [ext]') - 8 is the value I expect - which is the size of the remaining part of the memory region from x+2 in bytes.
We can argue about the semantics of this debug intrinsic or the name of it though.

Tue, Apr 6, 7:32 AM · Restricted Project

Thu, Apr 1

steakhal accepted D98502: [clang][Checkers] Extend PthreadLockChecker state dump (NFC)..
Thu, Apr 1, 12:56 AM · Restricted Project

Wed, Mar 31

steakhal updated the diff for D99659: [analyzer][taint] Extent of heap regions should get taint sometimes.

Add a FIXME about placing a NoteTag describing why the extent was getting tainted.

Wed, Mar 31, 10:03 AM · Restricted Project
steakhal added a comment to D83660: [analyzer] Fix a crash for dereferencing an empty llvm::Optional variable in SMTConstraintManager.h..

Can we automatically enable all test cases requiring z3 if clang is built with z3? I do not think the patch D83677 really make the problem fixed.

Z3 constraint manager is unsupported, thus no test runs those parts. And yea, crashes more often than not.

Wed, Mar 31, 10:01 AM · Restricted Project
steakhal updated the diff for D99658: [analyzer] Fix clang_analyzer_getExtent for heap regions.

Fix comments.
I could not manage to create an unknown extent, where the behavior would diverge.

Wed, Mar 31, 9:50 AM · Restricted Project
steakhal added a comment to D83660: [analyzer] Fix a crash for dereferencing an empty llvm::Optional variable in SMTConstraintManager.h..

I went through the change and it looks good, seems like this is indeed a copy paste error from line 132.
I checked the related conversation, and thanks for all the effort spent with the test.

BTW, I was obstructed by the z3 requirement in the regression test case when I tried to understand your test case. Even though I set the variables LLVM_Z3_INSTALL_DIR and LLVM_ENABLE_Z3_SOLVER during CMake, and the CSA can be correctly compiled with Z3, I still cannot make the test case run during make check-all. Therefore, this case was manually executed with llvm-lit -DUSE_Z3_SOLVER=1. Could you please tell me how to enable Z3 during llvm-lit.

I am a bit unhappy that we cannot run the test automatically, but maybe in the future.
@steakhal, https://reviews.llvm.org/D83677 seems to be related, should we push that?

I wouldn't mind fixing that yes, but right now I'm busy with other things.
Let's come back to it later.

Wed, Mar 31, 8:21 AM · Restricted Project
steakhal planned changes to D99658: [analyzer] Fix clang_analyzer_getExtent for heap regions.

Ah, I see you need nonloc::SymbolVal in your next patch, and getDynamicSizeWithOffset returns an Unknown if the extend is symbolic.

Anyway, I still feel misleading that clang_analyzer_getExtent does not handle the offset. Could we change getDynamicSizeWithOffset to return with a symbolic offset instead unknown without regression?

I'm gonna investigate. Thank you all for the snappy review!

Wed, Mar 31, 7:39 AM · Restricted Project
steakhal added inline comments to D83660: [analyzer] Fix a crash for dereferencing an empty llvm::Optional variable in SMTConstraintManager.h..
Wed, Mar 31, 7:20 AM · Restricted Project
steakhal requested review of D99659: [analyzer][taint] Extent of heap regions should get taint sometimes.
Wed, Mar 31, 6:31 AM · Restricted Project
steakhal requested review of D99658: [analyzer] Fix clang_analyzer_getExtent for heap regions.
Wed, Mar 31, 6:02 AM · Restricted Project
steakhal added inline comments to D98502: [clang][Checkers] Extend PthreadLockChecker state dump (NFC)..
Wed, Mar 31, 5:41 AM · Restricted Project
steakhal added inline comments to D99576: [ASTImporter][NFC] Improve test coverage.
Wed, Mar 31, 3:51 AM · Restricted Project
steakhal added inline comments to D99576: [ASTImporter][NFC] Improve test coverage.
Wed, Mar 31, 3:49 AM · Restricted Project
steakhal added inline comments to D99576: [ASTImporter][NFC] Improve test coverage.
Wed, Mar 31, 3:28 AM · Restricted Project
steakhal added reviewers for D83660: [analyzer] Fix a crash for dereferencing an empty llvm::Optional variable in SMTConstraintManager.h.: martong, balazske, Szelethus, ASDenysPetrov.

spam reviewers

Wed, Mar 31, 1:54 AM · Restricted Project
steakhal added reviewers for D89649: Fix __has_unique_object_representations with no_unique_address: erichkeane, rnk, majnemer, EricWF.

I'm adding a couple of reviewers to get this going.

Wed, Mar 31, 12:35 AM · Restricted Project
steakhal accepted D99181: [analyzer] Fix crash on spaceship operator (PR47511).
Wed, Mar 31, 12:32 AM · Restricted Project

Tue, Mar 30

steakhal accepted D98502: [clang][Checkers] Extend PthreadLockChecker state dump (NFC)..

Everything looks fine.
I like that regexp matcher so much. <3

Tue, Mar 30, 4:06 AM · Restricted Project
steakhal accepted D99344: [Analyzer] Track RValue expressions.

land it

Tue, Mar 30, 3:50 AM · Restricted Project
steakhal requested review of D99576: [ASTImporter][NFC] Improve test coverage.
Tue, Mar 30, 3:34 AM · Restricted Project
steakhal added inline comments to D99344: [Analyzer] Track RValue expressions.
Tue, Mar 30, 1:44 AM · Restricted Project

Sun, Mar 28

steakhal added a comment to D83660: [analyzer] Fix a crash for dereferencing an empty llvm::Optional variable in SMTConstraintManager.h..

Lets see what others think about this.
Im fine with it on my part.

Sun, Mar 28, 7:49 AM · Restricted Project

Fri, Mar 26

steakhal accepted D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

I don't know. I think it's already way better than it was.
I think we can reiterate this later.

Fri, Mar 26, 3:25 AM · Restricted Project
steakhal added a comment to D99344: [Analyzer] Track RValue expressions.

Some minor logical issues inline.

Fri, Mar 26, 3:18 AM · Restricted Project

Thu, Mar 25

steakhal added a comment to D99344: [Analyzer] Track RValue expressions.

I really like it. Looks good.
I'm letting someone else accept this as I've not really touched the trackExpression parts.

Thu, Mar 25, 8:57 AM · Restricted Project
steakhal added inline comments to D97183: [analyzer] Add NoteTag for smart-ptr get().
Thu, Mar 25, 5:24 AM · Restricted Project
steakhal added a comment to D99260: [analyzer] Fix false positives in inner pointer checker (PR49628).

I recommend splitting this into two. I would happily accept the part about std::data().

Thu, Mar 25, 5:09 AM · Restricted Project
steakhal added a comment to D97183: [analyzer] Add NoteTag for smart-ptr get().

@NoQ, why does the following trigger a null-dereference warning? (https://godbolt.org/z/Kxox8qd16)

void g(std::unique_ptr<A> a) {
  A *aptr = a.get();
  if (!aptr) {}
  a->foo();
}

When a->foo() is called, the constraint !aptr is no longer valid and so InnerPointerVal corresponding to a is no longer constrained to be null.
Am I missing something?

When the if's condition is evaluated, it probably triggered a state split. On one path the aptr (aka. the inner pointer) will be constrained to null.
The only way to be sure is by checking the exploded graph and see where it goes.

Thu, Mar 25, 4:54 AM · Restricted Project

Wed, Mar 24

steakhal added a comment to D99262: [analyzer] Fix dead store checker false positive.

I see your point.

Would it report this issue?

int test() {
  struct Foo foo = {0, 0}; // I would expect a warning here, that 'foo' was initialized but never read.
  (void)foo;
 return 0;
}

Only nits besides this.

We got one big fat complaint about that, and I can see the point.

We should at least document it as testcase.

Wed, Mar 24, 12:26 PM · Restricted Project
steakhal added a comment to D99262: [analyzer] Fix dead store checker false positive.

I see your point.

Wed, Mar 24, 11:46 AM · Restricted Project
steakhal requested changes to D96976: [analyzer] Fix reinterpret_cast handling for pointer-to-member.

This patch does not model faithfully how reinterpretcasting member pointers should work.

Wed, Mar 24, 10:25 AM · Restricted Project
steakhal accepted D99274: [analyzer] Fix crash when reasoning about C11 atomics (PR49422).

LGTM

Wed, Mar 24, 10:01 AM · Restricted Project
steakhal added a comment to D98918: [clang][lit] Allow test cases to use the compiler that are used to compile Clang.

Please commit this patch on my behalf (Ella Ma <alansnape3058@gmail.com>), so that I can continue with D83660 with your mocked solver.

Oh, I forgot about this one. My apologies.

Wed, Mar 24, 3:12 AM · Restricted Project
steakhal added a comment to D99181: [analyzer] Fix crash on spaceship operator (PR47511).

I'm always in favor of bugfixes. However, I have some concerns about this one.

Wed, Mar 24, 3:11 AM · Restricted Project

Tue, Mar 23

steakhal resigned from D99194: [analyzer] Fix body farm for Obj-C++ properties.

I'm not familiar with Objective-C.

Tue, Mar 23, 9:07 AM · Restricted Project

Mon, Mar 22

steakhal added inline comments to D98502: [clang][Checkers] Extend PthreadLockChecker state dump (NFC)..
Mon, Mar 22, 5:00 AM · Restricted Project
steakhal added a comment to D86465: [analyzer][solver] Redesign constraint ranges data structure.

It's getting complicated then xD. I guess we should complement unittests with LIT tests?
You can know there that clang is recent enough and pinning the target triple would also solve this.

My suggestion would be to check these separately with a possible fix.

Mon, Mar 22, 3:50 AM · Restricted Project
steakhal added a comment to D86465: [analyzer][solver] Redesign constraint ranges data structure.

This is not only a compiler feature, it also should be supported by the target architecture:
https://godbolt.org/z/ddjYYx9x6

It's getting complicated then xD. I guess we should complement unittests with LIT tests?
You can know there that clang is recent enough and pinning the target triple would also solve this.

Mon, Mar 22, 3:44 AM · Restricted Project
steakhal added a comment to D86465: [analyzer][solver] Redesign constraint ranges data structure.

I do have a bit of a struggle here. This is a unit-test and thus should be compiled for all of the supported architectures by all of the supported compilers.
Is there a __has_feature or something for me to check if _ExtInt can be used?

Mon, Mar 22, 2:39 AM · Restricted Project
steakhal accepted D86465: [analyzer][solver] Redesign constraint ranges data structure.

Given that it did not change any reports in our testbench it seems to be safe to land it.

Mon, Mar 22, 1:11 AM · Restricted Project

Sat, Mar 20

steakhal added inline comments to D98502: [clang][Checkers] Extend PthreadLockChecker state dump (NFC)..
Sat, Mar 20, 9:56 AM · Restricted Project

Fri, Mar 19

steakhal accepted D98948: [analyzer][solver] Fix infeasible constraints (PR49642).

Aa, get it. Looks good.

Fri, Mar 19, 10:31 AM · Restricted Project
steakhal added a comment to D97183: [analyzer] Add NoteTag for smart-ptr get().

I did not follow the discussion closely but we (CodeChecker team) might have a similar problem.
Consider this: https://godbolt.org/z/835P38

int do_bifurcation(int p) { return p < 0; }
Fri, Mar 19, 6:52 AM · Restricted Project
steakhal added a comment to D86465: [analyzer][solver] Redesign constraint ranges data structure.

Ah, I wanted to give it a go, but the bots caught an assertion failure for the parent revision of this. See the details at the Bugzilla ticket.

Fri, Mar 19, 5:41 AM · Restricted Project
steakhal added a comment to D98341: [analyzer][solver] Prevent infeasible states (PR49490).

The assertion areFeasible(Constraints) triggered on trunk.
More details in the Bugzilla ticket.

Fri, Mar 19, 5:38 AM · Restricted Project
steakhal accepted D98918: [clang][lit] Allow test cases to use the compiler that are used to compile Clang.

Oh, wait a minute. The config.host_cxx was already there.
Where is the symmetry :D It looks much better now, thanks.

Fri, Mar 19, 1:43 AM · Restricted Project

Wed, Mar 17

steakhal updated the diff for D98707: [clang][ASTImporter] Fix import of VarDecl regarding thread local storage spec.

Revert to the previous version and move to line 738 just before "ImportRecordTypeInFunc".

Wed, Mar 17, 10:06 AM · Restricted Project
steakhal updated the diff for D98707: [clang][ASTImporter] Fix import of VarDecl regarding thread local storage spec.

Moved to line 3481, changed the test logic accordingly.

Wed, Mar 17, 2:41 AM · Restricted Project
steakhal accepted D98741: [analyzer] Introduce common bug category "Unused code"..

Unused code seems to be broader and probably a better fit for a generic bug category.

Wed, Mar 17, 2:00 AM · Restricted Project

Tue, Mar 16

steakhal requested changes to D98726: [analyzer] Enabling MallocChecker to take up after SmartPtrModelling.

I don't think the TODO is addressed.
By checking the git blame quickly, there was no change committed to the SmartPtrChecker affecting the collaboration with the MallocChecker after the TODO was introduced in the source code.
Thus, I think the TODO is probably not yet addressed.

Tue, Mar 16, 11:37 AM · Restricted Project
steakhal added a comment to D96976: [analyzer] Fix reinterpret_cast handling for pointer-to-member.

I'm really sorry about being sooo picky about this patch.
It's not my expertise and the change seems to address a corner-case, so we have to especially careful not introducing bugs.

Tue, Mar 16, 11:12 AM · Restricted Project
steakhal requested review of D98707: [clang][ASTImporter] Fix import of VarDecl regarding thread local storage spec.
Tue, Mar 16, 7:07 AM · Restricted Project

Fri, Mar 12

steakhal added a comment to D96976: [analyzer] Fix reinterpret_cast handling for pointer-to-member.

@steakhal, your views?

I'm somewhat busy. If it's not urgent, I would postpone this.
Ping me in a few weeks.

Fri, Mar 12, 8:24 AM · Restricted Project

Mar 11 2021

steakhal added inline comments to D98341: [analyzer][solver] Prevent infeasible states (PR49490).
Mar 11 2021, 4:53 AM · Restricted Project
steakhal accepted D98341: [analyzer][solver] Prevent infeasible states (PR49490).

Looks good btw.

Mar 11 2021, 2:58 AM · Restricted Project

Mar 10 2021

steakhal added a comment to D97874: [analyzer] Improve SVal cast from integer to bool using known RangeSet.

@steakhal I personally don't see any fundamental problems with this patch

Then, I guess, it should be fine :)

Mar 10 2021, 6:40 AM · Restricted Project
steakhal added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

Actually many cases don't need to know an exact original type. Some cases can extract the type from SVal (SymbolVal, ConcreteInt) Other cases need it from outside (MemRegionVal, LocAsInteger).
dispatchCast, evalCastFromNonLoc, evalCastFromLoc have a lot of similar code which is already in evalCast. They also calls inside evalCast function. I decided to move their functionality into a new splitted version of evalCast to decrease complexity of comprehension and try to substitute them in the future with the single evalCast. But substitusion needs to deal something with absent original type parameter. Then I decided to add support for`evalCast` to work in both modes. Practically, new evaCast has additional checks and casts when the original type is not null.

Seems reasonable to me.

Mar 10 2021, 6:09 AM · Restricted Project
steakhal added a comment to D89055: [analyzer] Wrong type cast occures during pointer dereferencing after type punning.

I'm looking forward to this patch.

Mar 10 2021, 5:56 AM · Restricted Project
steakhal added a comment to D97874: [analyzer] Improve SVal cast from integer to bool using known RangeSet.

I would suggest not merging this patch.

Mar 10 2021, 5:47 AM · Restricted Project
steakhal added a comment to D96586: [analyzer][CTU][NFC] Add an extra regression test.

The test doesn't pass: http://45.33.8.238/linux/41341/step_7.txt

I think you just need to say rm -rf instead of rm -r on line 3 (?)

Mar 10 2021, 4:02 AM · Restricted Project
steakhal abandoned D82856: [analyzer][Z3-refutation] Add statistics for refutation visitor.

It might be useful in the future, but right now, I'm not interested in upstreaming this.

Mar 10 2021, 3:56 AM · Restricted Project
steakhal abandoned D82900: [analyzer][Z3-refutation] Add statistics tracking invalidated bug report classes.

It might be useful in the future, but right now, I'm not interested in upstreaming this.

Mar 10 2021, 3:55 AM · Restricted Project

Mar 9 2021

steakhal added a comment to D97277: [analyzer] [NFC] Eliminate dispatchCast, evalCastFromNonLoc and evalCastFromLoc functions from SValBuilder.

Please, @ASDenysPetrov, mention NFC in the commit message when you commit this change.
The same applies to all of your NFC changes.

Mar 9 2021, 9:20 AM · Restricted Project
steakhal accepted D98244: [analyzer] Fix StdLibraryFunctionsChecker performance issue.

For projects not using standard libraries, the speed-up can reach 50% after this patch.

Uh, that's something serious!

Mar 9 2021, 9:17 AM · Restricted Project
steakhal added a comment to D97388: [analyzer] Replace StoreManager::evalIntegralCast with SValBuilder::evalCast.

If @NoQ doesn't have any objections I'm ok with this change.

Mar 9 2021, 12:43 AM · Restricted Project
steakhal added a comment to D97388: [analyzer] Replace StoreManager::evalIntegralCast with SValBuilder::evalCast.

All reports and crashes are preserved at this point of the patch stack - with or without z3 crosscheck on multiple projects - even on llvm.

Mar 9 2021, 12:42 AM · Restricted Project

Mar 5 2021

steakhal added a comment to D96976: [analyzer] Fix reinterpret_cast handling for pointer-to-member.

Talking on the mailing list, I got a link on reinterpret_casting for pointer-to-member: https://timsong-cpp.github.io/cppwp/n4861/expr.reinterpret.cast#10
The gist is that this sort of cast is only valid if we cast back to the original type (that too with a caveat).

What is that caveat?

Mar 5 2021, 12:52 AM · Restricted Project

Mar 4 2021

steakhal requested review of D97936: [analyzer][docs][NFC] Fix typo in checkers.rst.
Mar 4 2021, 5:03 AM · Restricted Project
steakhal added a comment to D96586: [analyzer][CTU][NFC] Add an extra regression test.
In D96586#2601856, @NoQ wrote:

-analyzer-opt-analyze-headers

I'm actually shocked that we provide such option at all. And that it's the first option in the list in scan-build --help. And that I haven't noticed it until now despite that.

I didn't know about this option either xD

Mar 4 2021, 12:30 AM · Restricted Project

Mar 3 2021

steakhal added a comment to D97849: [AST][PCH][ASTImporter] Fix UB caused by uninited SwitchStmt member.

This looks reasonable to me (good catch!), but is there a way for us to add a regression test for it?

Mar 3 2021, 6:53 AM · Restricted Project

Mar 2 2021

steakhal added inline comments to D96976: [analyzer] Fix reinterpret_cast handling for pointer-to-member.
Mar 2 2021, 9:13 AM · Restricted Project
steakhal added a comment to D97183: [analyzer] Add NoteTag for smart-ptr get().

The InnerPointerVal memory region is not marked as interesting as of now, I have tried that out. The branch condition constraint is set by the ConstraintManager and it is queried via in the State in the method smartptr::isNullSmartPtr at SmartPtrModelling.cpp:104. I have to see if the ConstraintManager can mark the memory region as important.

Mar 2 2021, 7:41 AM · Restricted Project
steakhal added inline comments to D96976: [analyzer] Fix reinterpret_cast handling for pointer-to-member.
Mar 2 2021, 6:47 AM · Restricted Project
steakhal added a comment to D83660: [analyzer] Fix a crash for dereferencing an empty llvm::Optional variable in SMTConstraintManager.h..

I'm somewhat bothered that this patch is not landed yet. :|

Mar 2 2021, 5:13 AM · Restricted Project
steakhal added a comment to D97183: [analyzer] Add NoteTag for smart-ptr get().

If the inner pointer participates in a branch condition guarding the dereference, that memory region is gotta be important, right? So, we should mark it so.
A BugreportVisitor could easily transfer the information about the fact that the dereference was guarded by that particular branch condition - and marking the InnerPointerVal (MemRegion) important.

Mar 2 2021, 2:55 AM · Restricted Project

Mar 1 2021

steakhal requested changes to D96976: [analyzer] Fix reinterpret_cast handling for pointer-to-member.

I have serious concerns inline.

Mar 1 2021, 3:08 AM · Restricted Project
steakhal added a comment to D92777: [clang-tidy] Add bugprone-strlen-in-array-index checker.

I'm going to be honest, I have no idea how to move forward with this checker. I guess you've made some suggestions @steakhal, but I don't have any idea how to implement these as improvements.

Sorry for my complicated wording xD Let me express my thoughts in code instead.
Here is the matcher I roughly imagined:
https://godbolt.org/z/q4WsWj
The idea behind this is to explicitly recognize and ignore certain patterns. Such as *p && Val == p[strlen(p) - 1].
This way you can further reduce the number of false positives.

Mar 1 2021, 12:37 AM

Feb 26 2021

steakhal added a comment to D96976: [analyzer] Fix reinterpret_cast handling for pointer-to-member.

Unfortunately, all the methods on CXXRecordDecl, like the one you mentioned, are for querying and thus returns a bool, while I need the entire path.

AFAIK the second overload accepts an out parameter serving exactly our needs. Could you check if my assumption is correct?

Feb 26 2021, 6:44 AM · Restricted Project
steakhal added a comment to D96586: [analyzer][CTU][NFC] Add an extra regression test.

ping

Feb 26 2021, 5:52 AM · Restricted Project
steakhal added a comment to D97388: [analyzer] Replace StoreManager::evalIntegralCast with SValBuilder::evalCast.

Please make sure that you specify the parent revision or the patch can be applied on top of the tree.
Your lines clearly not match the top of the tree state.
https://github.com/llvm/llvm-project/blob/13f4448ae7db1a477ec2d48776e46415a3401314/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h#L129-L131

Feb 26 2021, 5:09 AM · Restricted Project
steakhal added a comment to D96976: [analyzer] Fix reinterpret_cast handling for pointer-to-member.

Many thanks for you comments, @steakhal!
I will address the issues you have pointed out in this comment. To clean things up I should perhaps add some more clarification to the summary.

Could you elaborate on what approach did you choose and more importantly, why that approach?
Why do we need a graph search here?

Pointer-to-members contain two things - a pointer to a NamedDecl to store the field/method being pointed to and a list of CXXBaseSpeciifier. This list is used to determine which sub-object the member lies in. This path needs to be determined and unfortunately with reinterpret_cast, the AST provides no structural assistance (unlike static_cast). Hence, it needs to be searched by searching through the BaseSpecifiers of the CXXRecordDecl.

So here you are implying that for reinterpret casts, the CastE->path_begin()-end() range is empty? And that is why you need to manually come up with a possible CXXBaseSpecifier list?

Feb 26 2021, 4:44 AM · Restricted Project

Feb 25 2021

steakhal added a comment to D96976: [analyzer] Fix reinterpret_cast handling for pointer-to-member.

@steakhal, could you please review this?

Feb 25 2021, 2:23 AM · Restricted Project

Feb 23 2021

steakhal added a reviewer for D97183: [analyzer] Add NoteTag for smart-ptr get(): xazax.hun.
Feb 23 2021, 11:16 AM · Restricted Project

Feb 22 2021

steakhal added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

@steakhal wrote:

This patch preserves all previous reports as expected.

Even with or without Z3 refutation.

Feb 22 2021, 6:55 AM · Restricted Project
steakhal added a comment to D97183: [analyzer] Add NoteTag for smart-ptr get().

Looks fine to me.

Feb 22 2021, 2:49 AM · Restricted Project
steakhal added a comment to D96773: [VPlan] Manage pairs of incoming (VPValue, VPBB) in VPWidenPHIRecipe..

This commit probably broke some Vectorize tests according to the build bots.
Could you please have a look?

Feb 22 2021, 2:21 AM · Restricted Project

Feb 19 2021

steakhal added a comment to D96905: [libclang] Add missing fixed point literal CursorKind to cindex.py.

You could call it like c-index-getCursor-fixed-point.c.

Hmm, to be honest, this was probably not what you wanted to test.
What about simply inserting your own use-case which uncovered this issue in the first place?

Feb 19 2021, 5:11 AM · Restricted Project
steakhal accepted D96905: [libclang] Add missing fixed point literal CursorKind to cindex.py.

Polite ping. This is a small and simple change, my only doubt is the test coverage. But frankly I see none of the literals are covered in any of the test cases (unless I'm missing something). Could I get some guidance on required test coverage for this simple change, or a LGTM?

I think if you really wish to test this, I think you should do something similar to c-index-getCursor-pp.

Feb 19 2021, 5:08 AM · Restricted Project
steakhal added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

Could you please rebase this?

I'll update and rebase this patch soon.

If it depends on any parent revisions please document them as well.

It does. You can see this in the stack. Do I need to mention this somewhere else?

No, I probably missed that. My bad.

Feb 19 2021, 12:51 AM · Restricted Project

Feb 17 2021

steakhal added inline comments to D94673: [analyzer][CTU] API for CTU macro expansions.
Feb 17 2021, 6:36 AM · Restricted Project
steakhal added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

This patch preserves all previous reports as expected.
You can check it by yourself at https://codechecker-demo.eastus.cloudapp.azure.com/Default/runs?run=D96090&items-per-page=50.

Feb 17 2021, 6:27 AM · Restricted Project

Feb 16 2021

steakhal added a comment to D87519: [analyzer][Liveness][NFC] Enqueue the CFGBlocks post-order.

What about analyzing a Sema translation unit? That should be beefy enough to have a longer runtime.

Feb 16 2021, 9:02 AM · Restricted Project
steakhal added a comment to D87146: [analyzer] Implement shared semantics checks for XNU functions in PthreadLockChecker.

Could you please give a few links to some documentation about the functions you are trying to model?
Is https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/KernelProgramming/synchronization/synchronization.html a legitimate resource for this?

Feb 16 2021, 7:12 AM · Restricted Project

Feb 15 2021

steakhal added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

@ASDenysPetrov Could you please rebase this?
git apply does not seem to apply this patch on top of llvm/main.
If it depends on any parent revisions please document them as well.

Feb 15 2021, 7:38 AM · Restricted Project

Feb 12 2021

steakhal added a comment to D96163: [analyzer] Add 12.0.0. release notes.

I'm ok with this on my part.

Feb 12 2021, 2:39 AM · Restricted Project