steakhal added a comment.
Submitted a backport request to land this in `clang-14.0.5`, since many `llvm`
devs might be affected by this crash due to `clangd` and `clang-tidy`
integration.
https://github.com/llvm/llvm-project/issues/55937
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAS
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc7fa4e8a8bc4: [analyzer] Fix null pointer deref in
CastValueChecker (authored by vabridgers, committed by einvbri
).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LA
vabridgers marked 8 inline comments as done.
vabridgers added a comment.
I think all comments have been addressed, please let me know if I missed some
detail :) Best!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127105/new/
https://reviews.llvm.
vabridgers updated this revision to Diff 434821.
vabridgers added a comment.
address @steakhal comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127105/new/
https://reviews.llvm.org/D127105
Files:
clang/lib/StaticAnalyzer/Checkers/CastValue
steakhal added inline comments.
Comment at: clang/test/Analysis/cast-value-notes.cpp:311
+public:
+ template void b() { isa(*this); }
+};
vabridgers wrote:
> steakhal wrote:
> > This gotta be the `getAs`. Please try to reconstruct the 'feel' of it;
> > like re
vabridgers added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:168
-CastToTy->getAsCXXRecordDecl()->getNameAsString() :
-CastToTy->getPointeeCXXRecordDecl()->getNameAsString();
Out << ' ' << ((CastToTyVec.si
steakhal added a comment.
Vince, please update the summary - it looks really weird. Along with that the
content of it might not be much useful, as we have a test case to demonstrate
the crash; you can probably remove those dumps etc.
Otherwise LGTM.
Comment at: clang/test/Ana
martong added inline comments.
Comment at: clang/test/Analysis/cast-value-state-dump.cpp:26
if (dyn_cast_or_null(S)) {
-// expected-note@-1 {{Assuming 'S' is not a 'Square'}}
+// expected-note@-1 {{Assuming 'S' is not a 'const class clang::Square *'}}
// expected-
steakhal added a comment.
Likely related to https://github.com/llvm/llvm-project/issues/55715. Mention
this in the summary as `Fixes #55715`.
Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:168
-CastToTy->getAsCXXRecordDecl()->getNameAsString() :
vabridgers updated this revision to Diff 434746.
vabridgers added a comment.
Use QualType::getAsString() per suggestion from martong
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127105/new/
https://reviews.llvm.org/D127105
Files:
clang/lib/Stat
vabridgers added a comment.
I was able to find and add a covering test case. I understand the fix may not
be "correct", but it does avoid the crash demonstrated by the test case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127105/new/
https://re
vabridgers updated this revision to Diff 434628.
vabridgers added a comment.
add test case
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127105/new/
https://reviews.llvm.org/D127105
Files:
clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp
vabridgers planned changes to this revision.
vabridgers added a comment.
I know this will need a reproducer, and I'm working on that. That work is still
in progress.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127105/new/
https://reviews.llvm.or
vabridgers created this revision.
vabridgers added reviewers: martong, steakhal, NoQ.
Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus,
mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun.
Herald added a project: All.
vabridgers requested review
14 matches
Mail list logo