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

2018-09-23 Thread Sergio Martins
https://bugs.kde.org/show_bug.cgi?id=388925

Sergio Martins  changed:

   What|Removed |Added

 Status|REPORTED|RESOLVED
 Resolution|--- |FIXED
  Latest Commit||https://commits.kde.org/cla
   ||zy/5b3a3464a2e0315dc452cc85
   ||74c4945afe2d8bf3

--- Comment #8 from Sergio Martins  ---
Git commit 5b3a3464a2e0315dc452cc8574c4945afe2d8bf3 by Sergio Martins.
Committed on 23/09/2018 at 14:11.
Pushed by smartins into branch '1.4'.

Fix crash in old-style-connect fixits

M  +22   -1src/checks/level2/old-style-connect.cpp

https://commits.kde.org/clazy/5b3a3464a2e0315dc452cc8574c4945afe2d8bf3

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

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

2018-03-24 Thread Sergio Martins
https://bugs.kde.org/show_bug.cgi?id=388925

--- Comment #7 from Sergio Martins  ---
Yes, clang 6.0 works fine too.
Could you attach the .cpp file that made it crash ? Or trim it down to the
essential part

-- 
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-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-14 Thread Sergio Martins
https://bugs.kde.org/show_bug.cgi?id=388925

--- Comment #4 from Sergio Martins  ---
weird, I don't have a line 450 in oldstyleconnect.cpp, which commit is this ?

-- 
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

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

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

Sergio Martins  changed:

   What|Removed |Added

   Assignee|unassigned-b...@kde.org |smart...@kde.org

-- 
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 Sergio Martins
https://bugs.kde.org/show_bug.cgi?id=388925

--- Comment #1 from Sergio Martins  ---
So it doesn't crash if you disable fixits ? Fixits should be disabled by
default already though, unless you enabled them.

Can you share the backtrace ?

-- 
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.