Ericsson / clang

Cross Translation Unit analysis capability for Clang Static Analyzer. (Fork of official clang at http://llvm.org/git/clang)
http://clang.llvm.org/
Other
15 stars 10 forks source link

Segmentation fault in clang::Expr::getObjectKind (this=0x0) at Expr.h:422 #695

Closed balazske closed 4 years ago

balazske commented 5 years ago

Analysis of protobuf with clang master "monorepo" commit b32ceb79b00a24312062b7d78ac29c0a3ba0cd8a and fix in https://reviews.llvm.org/D65445 is included.

Program received signal SIGSEGV, Segmentation fault.
0x00007fffe66ef8b2 in clang::Expr::getObjectKind (this=0x0) at llvm-project/clang/include/clang/AST/Expr.h:422
422     return static_cast<ExprObjectKind>(ExprBits.ObjectKind);
(gdb) bt
#0  0x00007fffe66ef8b2 in clang::Expr::getObjectKind (this=0x0) at llvm-project/clang/include/clang/AST/Expr.h:422
#1  0x00007fffe686c4e2 in clang::CXXDefaultArgExpr::CXXDefaultArgExpr (this=0x14126ff0, SC=clang::Stmt::CXXDefaultArgExprClass, Loc=..., Param=0x141223a0, UsedContext=0x14122560) at llvm-project/clang/include/clang/AST/ExprCXX.h:1129
#2  0x00007fffe686c621 in clang::CXXDefaultArgExpr::Create (C=..., Loc=..., Param=0x141223a0, UsedContext=0x14122560) at llvm-project/clang/include/clang/AST/ExprCXX.h:1142
#3  0x00007fffe68523a0 in clang::ASTNodeImporter::VisitCXXDefaultArgExpr (this=0x7fffffff0c10, E=0x1376d350) at llvm-project/clang/lib/AST/ASTImporter.cpp:6933
...
balazske commented 5 years ago

Fix for this problem: https://reviews.llvm.org/D65577