[clazy] [Bug 388925] Segmentation fault in OldStyleConnect::fixits() calling Expr::getBestDynamicClassType()

2018-01-18 Thread Tom Isaacson
https://bugs.kde.org/show_bug.cgi?id=388925

--- Comment #6 from Tom Isaacson  ---
Have you had any success in building with Clang 6.0? I can't figure out how to
override CMake from using Clang 3.8.

-- 
You are receiving this mail because:
You are watching all bug changes.

[clazy] [Bug 388925] Segmentation fault in OldStyleConnect::fixits() calling Expr::getBestDynamicClassType()

2018-01-14 Thread Tom Isaacson
https://bugs.kde.org/show_bug.cgi?id=388925

--- Comment #5 from Tom Isaacson  ---
I've made some small changes but nothing to do with this crash - line 450 is:
const auto record = expr ? expr->getBestDynamicClassType() : nullptr;

-- 
You are receiving this mail because:
You are watching all bug changes.

[clazy] [Bug 388925] Segmentation fault in OldStyleConnect::fixits() calling Expr::getBestDynamicClassType()

2018-01-13 Thread Tom Isaacson
https://bugs.kde.org/show_bug.cgi?id=388925

--- Comment #3 from Tom Isaacson  ---
I can open the .crash file using apport-retrace:
(gdb) bt
#0  0x7fe406a22240 in getInterestingTagDecl(clang::TagDecl*) () from
/home/tom/Documents/clazy/lib/ClangLazy.so
#1  0x7fe406247685 in OldStyleConnect::fixits (this=0x643fea0,
classification=12, call=0x7f3) at
/home/big/Documents/BitBucket/clazy/src/checks/level2/oldstyleconnect.cpp:450
#2  0x7fe406245915 in OldStyleConnect::VisitStmt (this=0x643fea0,
s=0x7f3) at
/home/big/Documents/BitBucket/clazy/src/checks/level2/oldstyleconnect.cpp:215
#3  0x7fe406270a1e in ClazyASTConsumer::VisitStmt (this=0x43b1380,
stm=0x7f3) at /home/big/Documents/BitBucket/clazy/src/Clazy.cpp:139
#4  0x7fe4062d503a in
clang::RecursiveASTVisitor::WalkUpFromStmt (this=0x43b1380,
S=0x7f3) at /usr/lib/llvm-3.8/include/clang/AST/RecursiveASTVisitor.h:320
#5  0x7fe4062d51f2 in
clang::RecursiveASTVisitor::WalkUpFromExpr (this=0x43b1380,
S=0x7f3) at /usr/lib/llvm-3.8/include/clang/AST/StmtNodes.inc:115
#6  0x7fe4062ce228 in
clang::RecursiveASTVisitor::WalkUpFromCallExpr
(this=0x43b1380, S=0x7f3) at
/usr/lib/llvm-3.8/include/clang/AST/StmtNodes.inc:311
#7  0x7fe4062b9581 in
clang::RecursiveASTVisitor::TraverseCallExpr (this=0x43b1380,
S=0x7f3, Queue=0x7ffeb1a1e430)
at /usr/lib/llvm-3.8/include/clang/AST/RecursiveASTVisitor.h:2195
#8  0x7fe4062a5f41 in
clang::RecursiveASTVisitor::dataTraverseNode (this=0x43b1380,
S=0x7f3, Queue=0x7ffeb1a1e430) at
/usr/lib/llvm-3.8/include/clang/AST/StmtNodes.inc:311
#9  0x7fe406290be0 in
clang::RecursiveASTVisitor::TraverseStmt (this=0x43b1380,
S=0x7f300d8, Queue=0x0) at
/usr/lib/llvm-3.8/include/clang/AST/RecursiveASTVisitor.h:560
#10 0x7fe406293f92 in
clang::RecursiveASTVisitor::TraverseFunctionHelper
(this=0x43b1380, D=0x7f2d330) at
/usr/lib/llvm-3.8/include/clang/AST/RecursiveASTVisitor.h:1795
#11 0x7fe406289c81 in
clang::RecursiveASTVisitor::TraverseCXXMethodDecl
(this=0x43b1380, D=0x7f2d330) at
/usr/lib/llvm-3.8/include/clang/AST/RecursiveASTVisitor.h:1806
#12 0x7fe4062828c2 in
clang::RecursiveASTVisitor::TraverseDecl (this=0x43b1380,
D=0x7f2d330) at /usr/lib/llvm-3.8/include/clang/AST/DeclNodes.inc:367
#13 0x7fe40628fe7e in
clang::RecursiveASTVisitor::TraverseDeclContextHelper
(this=0x43b1380, DC=0x4366d00) at
/usr/lib/llvm-3.8/include/clang/AST/RecursiveASTVisitor.h:1231
#14 0x7fe40628aa4f in
clang::RecursiveASTVisitor::TraverseTranslationUnitDecl
(this=0x43b1380, D=0x4366ce0) at
/usr/lib/llvm-3.8/include/clang/AST/RecursiveASTVisitor.h:1321
#15 0x7fe406282c25 in
clang::RecursiveASTVisitor::TraverseDecl (this=0x43b1380,
D=0x4366ce0) at /usr/lib/llvm-3.8/include/clang/AST/DeclNodes.inc:491
#16 0x7fe406270ab7 in ClazyASTConsumer::HandleTranslationUnit
(this=0x43b1380, ctx=...) at
/home/big/Documents/BitBucket/clazy/src/Clazy.cpp:151
#17 0x7fe406a7376a in clang::ParseAST(clang::Sema&, bool, bool) () from
/home/tom/Documents/clazy/lib/ClangLazy.so
#18 0x7fe40632ecce in clang::FrontendAction::Execute() () from
/home/tom/Documents/clazy/lib/ClangLazy.so
#19 0x7fe406351656 in
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) () from
/home/tom/Documents/clazy/lib/ClangLazy.so
#20 0x004e3916 in
clang::tooling::FrontendActionFactory::runInvocation(clang::CompilerInvocation*,
clang::FileManager*, std::shared_ptr,
clang::DiagnosticConsumer*)
()
#21 0x004dee10 in clang::tooling::ToolInvocation::runInvocation(char
const*, clang::driver::Compilation*, clang::CompilerInvocation*,
std::shared_ptr) ()
#22 0x004e17b9 in clang::tooling::ToolInvocation::run() ()
#23 0x004e27c5 in
clang::tooling::ClangTool::run(clang::tooling::ToolAction*) ()
#24 0x004ae1c7 in main (argc=41, argv=0x7ffeb1a1f7e8) at
/home/big/Documents/BitBucket/clazy/src/ClazyStandaloneMain.cpp:103

-- 
You are receiving this mail because:
You are watching all bug changes.

[clazy] [Bug 388925] Segmentation fault in OldStyleConnect::fixits() calling Expr::getBestDynamicClassType()

2018-01-13 Thread Tom Isaacson
https://bugs.kde.org/show_bug.cgi?id=388925

--- Comment #2 from Tom Isaacson  ---
No. I've turned them on - my command line is:
export CLAZY_FIXIT=fix-old-style-connect && find . -name "*cpp" -print | xargs
/usr/bin/clazy-standalone -extra-arg=-Wno-unknown-warning-option
-extra-arg=-fms-extensions -extra-arg=-Wno-inconsistent-missing-override -p
build/compile_commands.json -checks=old-style-connect

Stacktrace:
 #0  0x7f7fcac23240 in getInterestingTagDecl(clang::TagDecl*) () from
/home/tom/Documents/clazy/lib/ClangLazy.so
 No symbol table info available.
 #1  0x7f7fca448685 in OldStyleConnect::fixits (this=0x52543f0,
classification=12, call=0x7c322d0) at
/home/big/Documents/BitBucket/clazy/src/checks/level2/oldstyleconnect.cpp:450
 expr = 0x7c31200
 record = 0x0
 s = {ID = 4125}
 lastRecordDecl = 0x26d2298
 arg = 0x7c31200
 __for_range = 
 __for_begin = { >> =
{> = {> = {}, }, I = 0x7c322f8}, }
 __for_end = { >> =
{> = {> = {}, }, I = 0x7c32310}, }
 fixits = std::vector of length 0, capacity 0
 macroNum = 0
 implicitCallee = ""
 macroName = ""
 senderMethod = 0x0
 #2  0x7f7fca446915 in OldStyleConnect::VisitStmt (this=0x52543f0,
s=0x7c322d0) at
/home/big/Documents/BitBucket/clazy/src/checks/level2/oldstyleconnect.cpp:215
 call = 0x7c322d0
 function = 0x1fd74f0
 classification = 12
 #3  0x7f7fca471a1e in ClazyASTConsumer::VisitStmt (this=0x39662f0,
stm=0x7c322d0) at /home/big/Documents/BitBucket/clazy/src/Clazy.cpp:139
 check = 0x52543f0
 __for_range = std::vector of length 1, capacity 1 = {0x52543f0}
 __for_begin = 
 __for_end = 
 parentMap = 0x78c61f0
 isFromIgnorableInclude = false
 #4  0x7f7fca4d603a in
clang::RecursiveASTVisitor::WalkUpFromStmt (this=0x39662f0,
S=0x7c322d0) at /usr/lib/llvm-3.8/include/clang/AST/RecursiveASTVisitor.h:320
 No locals.
 #5  0x7f7fca4d61f2 in
clang::RecursiveASTVisitor::WalkUpFromExpr (this=0x39662f0,
S=0x7c322d0) at /usr/lib/llvm-3.8/include/clang/AST/StmtNodes.inc:115
 No locals.
 #6  0x7f7fca4cf228 in
clang::RecursiveASTVisitor::WalkUpFromCallExpr
(this=0x39662f0, S=0x7c322d0) at
/usr/lib/llvm-3.8/include/clang/AST/StmtNodes.inc:311
 No locals.
 #7  0x7f7fca4ba581 in
clang::RecursiveASTVisitor::TraverseCallExpr (this=0x39662f0,
S=0x7c322d0, Queue=0x7ffd5832cc90) at
/usr/lib/llvm-3.8/include/clang/AST/RecursiveASTVisitor.h:2195
 No locals.
 #8  0x7f7fca4a6f41 in
clang::RecursiveASTVisitor::dataTraverseNode (this=0x39662f0,
S=0x7c322d0, Queue=0x7ffd5832cc90) at
/usr/lib/llvm-3.8/include/clang/AST/StmtNodes.inc:311
 No locals.
 #9  0x7f7fca491be0 in
clang::RecursiveASTVisitor::TraverseStmt (this=0x39662f0,
S=0x7c323a8, Queue=0x0) at
/usr/lib/llvm-3.8/include/clang/AST/RecursiveASTVisitor.h:560
 CurrS = 0x7c322d0
 N = 0
 LocalQueue = {> =
{> =
{> =
{ = {BeginX = 0x7ffd5832cca8, EndX = 0x7ffd5832cca8,
CapacityX = 0x7ffd5832cce8}, FirstEl = {> =
{buffer = "\320\"\303\a\000\000\000"}, }}, },
}, Storage = {InlineElts = {{>
= {buffer = "\360\366\302\a\000\000\000"}, },
{> = {buffer = "\031#\263\312\177\177\000"},
}, {> = {buffer =
"\000\000\000\000\000\000\000"}, },
{> = {buffer = "{J\262\312\177\177\000"}, }, {> = {buffer =
"\350\365\302\a\000\000\000"}, }, {> = {buffer = "\300\315\062X\375\177\000"}, },
{> = {buffer = "\220 \261\003\000\000\000"},

 #10 0x7f7fca494f92 in
clang::RecursiveASTVisitor::TraverseFunctionHelper
(this=0x39662f0, D=0x7c2f600) at
/usr/lib/llvm-3.8/include/clang/AST/RecursiveASTVisitor.h:1795
 No locals.
 #11 0x7f7fca48ac81 in
clang::RecursiveASTVisitor::TraverseCXXMethodDecl
(this=0x39662f0, D=0x7c2f600) at
/usr/lib/llvm-3.8/include/clang/AST/RecursiveASTVisitor.h:1806
 No locals.
 #12 0x7f7fca4838c2 in
clang::RecursiveASTVisitor::TraverseDecl (this=0x39662f0,
D=0x7c2f600) at /usr/lib/llvm-3.8/include/clang/AST/DeclNodes.inc:367
 No locals.
 #13 0x7f7fca490e7e in
clang::RecursiveASTVisitor::TraverseDeclContextHelper
(this=0x39662f0, DC=0x67b7750) at
/usr/lib/llvm-3.8/include/clang/AST/RecursiveASTVisitor.h:1231
 Child = 0x7c2f600
 __for_range = 
 __for_begin = {Current = 0x7c2f600}
 __for_end = {Current = 0x0}
 #14 0x7f7fca48ba4f in
clang::RecursiveASTVisitor::TraverseTranslationUnitDecl
(this=0x39662f0, D=0x67b7730) at
/usr/lib/llvm-3.8/include/clang/AST/RecursiveASTVisitor.h:1321
 No locals.
 #15 0x7f7fca483c25 in
clang::RecursiveASTVisitor::TraverseDecl (this=0x39662f0,
D=0x67b7730) at /usr/lib/llvm-3.8/include/clang/AST/DeclNodes.inc:491
 No locals.
 #16 0x7f7fca471ab7 in ClazyASTConsumer::HandleTranslationUnit
(this=0x39662f0, ctx=...) at
/home/big/Documents/Bi

[clazy] [Bug 388925] New: Segmentation fault in Expr::getBestDynamicClassTypeExpr()

2018-01-13 Thread Tom Isaacson
https://bugs.kde.org/show_bug.cgi?id=388925

Bug ID: 388925
   Summary: Segmentation fault in
Expr::getBestDynamicClassTypeExpr()
   Product: clazy
   Version: unspecified
  Platform: Ubuntu Packages
OS: Linux
Status: UNCONFIRMED
  Severity: crash
  Priority: NOR
 Component: general
  Assignee: unassigned-b...@kde.org
  Reporter: tom.isaac...@navico.com
CC: smart...@kde.org
  Target Milestone: ---

I'm running clazy-standalone on my codebase and it keeps crashing. The stack
showed me it was crashing while calling Expr::getBestDynamicClassType() from
OldStyleConnect::fixits() and I was able to confirm this by adding debug
output.

I'm wondering if this is
https://www.mail-archive.com/llvm-bugs@lists.llvm.org/msg16745.html so I tried
recompiling clazy with clang 6.0 but I'm having trouble. I've built the clang
source myself but there doesn't seem to be a way to override FindClang.cmake
with my build directory rather than Ubuntu's default clang 3.8 install. Do I
have to edit the cmake build myself?

-- 
You are receiving this mail because:
You are watching all bug changes.

[clazy] [Bug 388925] Segmentation fault in OldStyleConnect::fixits() calling Expr::getBestDynamicClassType()

2018-01-13 Thread Tom Isaacson
https://bugs.kde.org/show_bug.cgi?id=388925

Tom Isaacson  changed:

   What|Removed |Added

Summary|Segmentation fault in   |Segmentation fault in
   |Expr::getBestDynamicClassTy |OldStyleConnect::fixits()
   |peExpr()|calling
   ||Expr::getBestDynamicClassTy
   ||pe()

-- 
You are receiving this mail because:
You are watching all bug changes.