[cfe-dev] TraverseDecl generate Segmentation fault
Hao Jiang
hjian001 at fiu.edu
Sun May 8 12:57:36 PDT 2011
Hello,
I wrote a plugin to use clang traversing AST. It used to work fine but after
I updated and built clang today It generated exception as following:
0 clang 0x000000000247b4bd
1 clang 0x000000000247b2b0
2 libpthread.so.0 0x00007f352be90190
3 libAnnotate.so 0x00007f352af51c08
clang::RecursiveASTVisitor<minissf::Annotate>::TraverseTypeAliasDecl(clang::TypeAliasDecl*)
+ 24
4 libAnnotate.so 0x00007f352af4e201
clang::RecursiveASTVisitor<minissf::Annotate>::TraverseDeclContextHelper(clang::DeclContext*)
+ 65
5 libAnnotate.so 0x00007f352af4e835
clang::RecursiveASTVisitor<minissf::Annotate>::TraverseStaticAssertDecl(clang::StaticAssertDecl*)
+ 85
6 clang 0x00000000012bf31a clang::ParseAST(clang::Sema&, bool) +
667
7 clang 0x000000000101bad3
clang::ASTFrontendAction::ExecuteAction() + 263
8 clang 0x000000000101b724 clang::FrontendAction::Execute() + 326
9 clang 0x0000000001002ae5
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 751
10 clang 0x0000000000faa14f
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 908
11 clang 0x0000000000f9bde7 cc1_main(char const**, char const**,
char const*, void*) + 982
12 clang 0x0000000000fa589d main + 499
13 libc.so.6 0x00007f352b180abd __libc_start_main + 253
14 clang 0x0000000000f9b489
Stack dump:
0. Program arguments: clang -cc1 -I../.. -load
../../../xlate/Annotate/libAnnotate.so -plugin minissf-annotate chevt.cc
1. <eof> parser at end of file
Segmentation fault
I also tried to run BoostConAction example, it generate same error. It seems
to me that TraverseDecl function does not work after updating. Anyone knows
how to fix it? Thank you very much for your help.
Hao Jiang
--
View this message in context: http://clang-developers.42468.n3.nabble.com/TraverseDecl-generate-Segmentation-fault-tp2916260p2916260.html
Sent from the Clang Developers mailing list archive at Nabble.com.
More information about the cfe-dev
mailing list