{"action":"created","issue":{"url":"https://api.github.com/repos/CastXML/CastXML/issues/1","labels_url":"https://api.github.com/repos/CastXML/CastXML/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/CastXML/CastXML/issues/1/comments","events_url":"https://api.github.com/repos/CastXML/CastXML/issues/1/events","html_url":"https://github.com/CastXML/CastXML/issues/1","id":53536969,"number":1,"title":"castxml crash","user":{"login":"mamoll","id":2381200,"avatar_url":"https://avatars.githubusercontent.com/u/2381200?v=3","gravatar_id":"","url":"https://api.github.com/users/mamoll","html_url":"https://github.com/mamoll","followers_url":"https://api.github.com/users/mamoll/followers","following_url":"https://api.github.com/users/mamoll/following{/other_user}","gists_url":"https://api.github.com/users/mamoll/gists{/gist_id}","starred_url":"https://api.github.com/users/mamoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mamoll/subscriptions","organizations_url":"https://api.github.com/users/mamoll/orgs","repos_url":"https://api.github.com/users/mamoll/repos","events_url":"https://api.github.com/users/mamoll/events{/privacy}","received_events_url":"https://api.github.com/users/mamoll/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-06T17:07:36Z","updated_at":"2015-03-30T20:41:33Z","closed_at":null,"body":"I just tried castxml as a possible replacement for gccxml. It crashes, but I have no idea how to track down the problem. This with llvm/clang 3.6 at r225216 installed via MacPorts. \r\n```\r\n> lldb /usr/local/bin/castxml\r\n(lldb) target create \"/usr/local/bin/castxml\"\r\nCurrent executable set to '/usr/local/bin/castxml' (x86_64).\r\n(lldb) r -v -x c++  --castxml-gccxml  -iwithprefix /opt/local/libexec/llvm-3.6/lib/c++/v1  -I\".\" -I\"/Users/mmoll/omplapp/ompl/src\" -I\"/Users/mmoll/omplapp/src\" -I\"/opt/local/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m\" -I\"/opt/local/include\" -I\"/opt/local/include\"   \"bindings/util.h\" -o=foo.xml\r\nProcess 4223 launched: '/usr/local/bin/castxml' (x86_64)\r\nclang version 3.6.0 (trunk 225216)\r\nTarget: x86_64-apple-darwin14.0.0\r\nThread model: posix\r\nclang -cc1 version 3.6.0 based upon LLVM 3.6.0svn default target x86_64-apple-darwin14.0.0\r\nignoring nonexistent directory \"/usr/local/include/c++/v1\"\r\nignoring nonexistent directory \"/usr/include/c++/v1\"\r\nignoring duplicate directory \"/opt/local/include\"\r\n#include \"...\" search starts here:\r\n#include <...> search starts here:\r\n .\r\n /Users/mmoll/omplapp/ompl/src\r\n /Users/mmoll/omplapp/src\r\n /opt/local/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m\r\n /opt/local/include\r\n /usr/local/include\r\n /usr/local/share/castxml/clang/include\r\n /usr/include\r\n /System/Library/Frameworks (framework directory)\r\n /Library/Frameworks (framework directory)\r\n /opt/local/libexec/llvm-3.6/lib/c++/v1\r\nEnd of search list.\r\nProcess 4223 stopped\r\n* thread #1: tid = 0x337c7, 0x000000010001b82c castxml`clang::FunctionType::getReturnType(this=0x0000000000000000) const + 12 at Type.h:2823, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x18)\r\n    frame #0: 0x000000010001b82c castxml`clang::FunctionType::getReturnType(this=0x0000000000000000) const + 12 at Type.h:2823\r\n   2820\t  unsigned getTypeQuals() const { return FunctionTypeBits.TypeQuals; }\r\n   2821\t\r\n   2822\tpublic:\r\n-> 2823\t  QualType getReturnType() const { return ResultType; }\r\n   2824\t\r\n   2825\t  bool getHasRegParm() const { return getExtInfo().getHasRegParm(); }\r\n   2826\t  unsigned getRegParmType() const { return getExtInfo().getRegParm(); }\r\n(lldb) bt\r\n* thread #1: tid = 0x337c7, 0x000000010001b82c castxml`clang::FunctionType::getReturnType(this=0x0000000000000000) const + 12 at Type.h:2823, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x18)\r\n  * frame #0: 0x000000010001b82c castxml`clang::FunctionType::getReturnType(this=0x0000000000000000) const + 12 at Type.h:2823\r\n    frame #1: 0x00000001000129db castxml`ASTVisitor::AddDumpNode(this=0x00007fff5fbfd1b0, d=0x0000000105175eb0, complete=true) + 427 at Output.cxx:448\r\n    frame #2: 0x0000000100013794 castxml`ASTVisitor::AddDeclContextMembers(this=0x00007fff5fbfd1b0, dc=0x0000000105175e80, emitted=0x00007fff5fbfcbb8) + 756 at Output.cxx:669\r\n    frame #3: 0x0000000100013768 castxml`ASTVisitor::AddDeclContextMembers(this=0x00007fff5fbfd1b0, dc=0x000000010302f4e0, emitted=0x00007fff5fbfcbb8) + 712 at Output.cxx:654\r\n    frame #4: 0x000000010001952b castxml`ASTVisitor::PrintMembersAttribute(this=0x00007fff5fbfd1b0, dc=0x000000010302f4e0) + 139 at Output.cxx:983\r\n    frame #5: 0x0000000100017c39 castxml`ASTVisitor::OutputTranslationUnitDecl(this=0x00007fff5fbfd1b0, d=0x000000010302f4c0, dn=0x0000000105988ae8) + 313 at Output.cxx:1223\r\n    frame #6: 0x0000000100014fbe castxml`ASTVisitor::OutputDecl(this=0x00007fff5fbfd1b0, d=0x000000010302f4c0, dn=0x0000000105988ae8) + 1710 at DeclNodes.inc:473\r\n    frame #7: 0x00000001000148b4 castxml`ASTVisitor::ProcessQueue(this=0x00007fff5fbfd1b0) + 660 at Output.cxx:729\r\n    frame #8: 0x000000010001b34c castxml`ASTVisitor::HandleTranslationUnit(this=0x00007fff5fbfd1b0, tu=0x000000010302f4c0) + 620 at Output.cxx:1681\r\n    frame #9: 0x000000010001b41d castxml`outputXML(ci=0x0000000102e07530, ctx=0x0000000103028000, os=0x0000000102e0a0f0, opts=0x00007fff5fbfedc8) + 125 at Output.cxx:1706\r\n    frame #10: 0x000000010003b5e0 castxml`ASTConsumer::HandleTranslationUnit(this=0x0000000102e0f310, ctx=0x0000000103028000) + 336 at RunClang.cxx:122\r\n    frame #11: 0x0000000100220b3c castxml`clang::ParseAST(S=0x000000010304a200, PrintStats=false, SkipFunctionBodies=<unavailable>) + 391 at ParseAST.cpp:151\r\n    frame #12: 0x00000001000e4ab5 castxml`clang::FrontendAction::Execute(this=<unavailable>) + 67 at FrontendAction.cpp:428\r\n    frame #13: 0x00000001000c119b castxml`clang::CompilerInstance::ExecuteAction(this=0x0000000102e07530, Act=0x0000000102e08600) + 547 at CompilerInstance.cpp:811\r\n    frame #14: 0x0000000100038a8e castxml`runClangCI(CI=0x0000000102e07530, opts=0x00007fff5fbfedc8) + 862 at RunClang.cxx:253\r\n    frame #15: 0x0000000100037626 castxml`runClangImpl(argBeg=0x00007fff5fbfe8f8, argEnd=0x00007fff5fbfe960, opts=0x00007fff5fbfedc8) + 4486 at RunClang.cxx:338\r\n    frame #16: 0x0000000100036428 castxml`runClang(argBeg=0x00007fff5fbff128, argEnd=0x00007fff5fbff190, opts=0x00007fff5fbfedc8) + 3112 at RunClang.cxx:409\r\n    frame #17: 0x00000001000045d4 castxml`main(argc_in=15, argv_in=0x00007fff5fbff478) + 6052 at castxml.cxx:262\r\n    frame #18: 0x00007fff8766c5c9 libdyld.dylib`start + 1\r\n    frame #19: 0x00007fff8766c5c9 libdyld.dylib`start + 1\r\n(lldb) "},"comment":{"url":"https://api.github.com/repos/CastXML/CastXML/issues/comments/87825640","html_url":"https://github.com/CastXML/CastXML/issues/1#issuecomment-87825640","issue_url":"https://api.github.com/repos/CastXML/CastXML/issues/1","id":87825640,"user":{"login":"mamoll","id":2381200,"avatar_url":"https://avatars.githubusercontent.com/u/2381200?v=3","gravatar_id":"","url":"https://api.github.com/users/mamoll","html_url":"https://github.com/mamoll","followers_url":"https://api.github.com/users/mamoll/followers","following_url":"https://api.github.com/users/mamoll/following{/other_user}","gists_url":"https://api.github.com/users/mamoll/gists{/gist_id}","starred_url":"https://api.github.com/users/mamoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mamoll/subscriptions","organizations_url":"https://api.github.com/users/mamoll/orgs","repos_url":"https://api.github.com/users/mamoll/repos","events_url":"https://api.github.com/users/mamoll/events{/privacy}","received_events_url":"https://api.github.com/users/mamoll/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T20:41:33Z","updated_at":"2015-03-30T20:41:33Z","body":"Here's some more info. The problem turns out to be in Boost (I use Boost 1.57, installed via MacPorts). I used the latest CastXML from the repo. CastXML crashes, e.g., on ${prefix}/include/boost/random/mersenne_twister.hpp:\r\n```\r\n> lldb /usr/local/castxml/bin/castxml \r\n(lldb) target create \"/usr/local/castxml/bin/castxml\"\r\nCurrent executable set to '/usr/local/castxml/bin/castxml' (x86_64).\r\n(lldb) r -v -x c++  --castxml-gccxml  -iwithprefix /opt/local/libexec/llvm-3.6/lib/c++/v1 -I\"/opt/local/include\" /opt/local/include/boost/random/mersenne_twister.hpp  -o=foo.xml\r\nProcess 61609 launched: '/usr/local/castxml/bin/castxml' (x86_64)\r\nclang version 3.6.0 (tags/RELEASE_360/final)\r\nTarget: x86_64-apple-darwin14.1.0\r\nThread model: posix\r\nclang -cc1 version 3.6.0 based upon LLVM 3.6.0 default target x86_64-apple-darwin14.1.0\r\nignoring nonexistent directory \"/usr/local/castxml/include/c++/v1\"\r\nignoring nonexistent directory \"/usr/include/c++/v1\"\r\n#include \"...\" search starts here:\r\n#include <...> search starts here:\r\n /opt/local/include\r\n /usr/local/include\r\n /usr/local/castxml/share/castxml/clang/include\r\n /usr/include\r\n /System/Library/Frameworks (framework directory)\r\n /Library/Frameworks (framework directory)\r\n /opt/local/libexec/llvm-3.6/lib/c++/v1\r\nEnd of search list.\r\nProcess 61609 stopped\r\n* thread #1: tid = 0x298779, 0x0000000100020c6c castxml`clang::FunctionType::getReturnType() const + 12, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x18)\r\n    frame #0: 0x0000000100020c6c castxml`clang::FunctionType::getReturnType() const + 12\r\ncastxml`clang::FunctionType::getReturnType() const + 12:\r\n-> 0x100020c6c:  movq   0x18(%rdi), %rdi\r\n   0x100020c70:  movq   %rdi, -0x8(%rbp)\r\n   0x100020c74:  movq   -0x8(%rbp), %rax\r\n   0x100020c78:  popq   %rbp\r\n(lldb) bt\r\n* thread #1: tid = 0x298779, 0x0000000100020c6c castxml`clang::FunctionType::getReturnType() const + 12, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x18)\r\n  * frame #0: 0x0000000100020c6c castxml`clang::FunctionType::getReturnType() const + 12\r\n    frame #1: 0x0000000100017beb castxml`ASTVisitor::AddDumpNode(clang::Decl const*, bool) + 427\r\n    frame #2: 0x000000010001899e castxml`ASTVisitor::AddDeclContextMembers(clang::DeclContext const*, std::__1::set<unsigned int, std::__1::less<unsigned int>, std::__1::allocator<unsigned int> >&) + 750\r\n    frame #3: 0x0000000100018972 castxml`ASTVisitor::AddDeclContextMembers(clang::DeclContext const*, std::__1::set<unsigned int, std::__1::less<unsigned int>, std::__1::allocator<unsigned int> >&) + 706\r\n    frame #4: 0x000000010001e7d5 castxml`ASTVisitor::PrintMembersAttribute(clang::DeclContext const*) + 69\r\n    frame #5: 0x000000010001cf7f castxml`ASTVisitor::OutputTranslationUnitDecl(clang::TranslationUnitDecl const*, ASTVisitorBase::DumpNode const*) + 303\r\n    frame #6: 0x000000010001a1ae castxml`ASTVisitor::OutputDecl(clang::Decl const*, ASTVisitorBase::DumpNode const*) + 1710\r\n    frame #7: 0x0000000100019aa4 castxml`ASTVisitor::ProcessQueue() + 660\r\n    frame #8: 0x00000001000208c6 castxml`ASTVisitor::HandleTranslationUnit(clang::TranslationUnitDecl const*) + 614\r\n    frame #9: 0x000000010002099d castxml`outputXML(clang::CompilerInstance&, clang::ASTContext const&, llvm::raw_ostream&, Options const&) + 125\r\n    frame #10: 0x0000000100042b7d castxml`ASTConsumer::HandleTranslationUnit(clang::ASTContext&) + 333\r\n    frame #11: 0x00000001001fc7c2 castxml`clang::ParseAST(S=0x0000000103049c00, PrintStats=false, SkipFunctionBodies=<unavailable>) + 391 at ParseAST.cpp:151\r\n    frame #12: 0x00000001000e672c castxml`clang::FrontendAction::Execute(this=<unavailable>) + 62 at FrontendAction.cpp:428\r\n    frame #13: 0x00000001000c4d14 castxml`clang::CompilerInstance::ExecuteAction(this=0x0000000102907140, Act=0x0000000102907620) + 450 at CompilerInstance.cpp:811\r\n    frame #14: 0x000000010003f998 castxml`runClangCI(clang::CompilerInstance*, Options const&) + 856\r\n    frame #15: 0x000000010003e532 castxml`runClangImpl(char const* const*, char const* const*, Options const&) + 4434\r\n    frame #16: 0x000000010003d371 castxml`runClang(char const* const*, char const* const*, Options const&) + 3105\r\n    frame #17: 0x0000000100003e58 castxml`main + 5976\r\n    frame #18: 0x00007fff8e4195c9 libdyld.dylib`start + 1\r\n```\r\n"}}