[cfe-dev] abort calling getTypeSize

Peeter Joot peeter.joot at gmail.com
Mon Feb 25 12:03:06 PST 2013


On Mon, Feb 25, 2013 at 1:45 PM, Dmitri Gribenko <gribozavr at gmail.com>wrote:

> Try CXXRecordDecl::getDescribedClassTemplate() -- it will return a
> corresponding ClassTemplateDecl given a CXXRecordDecl for 'A' in:
> template<typename T> struct A {};
>

Okay, that worked nicely for that source.  Going back to the source I
started with, I hit a different abort, in llvm_unreachable_internal()
instead:

Should not see dependent types
UNREACHABLE executed at
/home/hotellnx94/peeterj/clang/sources/llvm/tools/clang/lib/AST/ASTContext.cpp:1322!

Program received signal SIGABRT, Aborted.
0x00002aaaab39ef45 in raise () from /lib64/libc.so.6
(gdb) where
#0  0x00002aaaab39ef45 in raise () from /lib64/libc.so.6
#1  0x00002aaaab3a0340 in abort () from /lib64/libc.so.6
#2  0x0000000000f0281c in llvm::llvm_unreachable_internal (msg=0x132cbc8
"Should not see dependent types",
    file=0x132c1b8
"/home/hotellnx94/peeterj/clang/sources/llvm/tools/clang/lib/AST/ASTContext.cpp",
line=1322)
    at
/home/hotellnx94/peeterj/clang/sources/llvm/lib/Support/ErrorHandling.cpp:98
#3  0x0000000000c1c948 in clang::ASTContext::getTypeInfoImpl
(this=0x1b38300, T=0x39190b0)
    at
/home/hotellnx94/peeterj/clang/sources/llvm/tools/clang/lib/AST/ASTContext.cpp:1322
#4  0x0000000000c1c86d in clang::ASTContext::getTypeInfo (this=0x1b38300,
T=0x39190b0)
    at
/home/hotellnx94/peeterj/clang/sources/llvm/tools/clang/lib/AST/ASTContext.cpp:1301
#5  0x0000000000c1c752 in clang::ASTContext::getTypeInfoInChars
(this=0x1b38300, T=0x39190b0)
    at
/home/hotellnx94/peeterj/clang/sources/llvm/tools/clang/lib/AST/ASTContext.cpp:1286
#6  0x0000000000c1c7cc in clang::ASTContext::getTypeInfoInChars
(this=0x1b38300, T=...)
    at
/home/hotellnx94/peeterj/clang/sources/llvm/tools/clang/lib/AST/ASTContext.cpp:1293
#7  0x0000000000d65b47 in (anonymous
namespace)::RecordLayoutBuilder::LayoutField (this=0x7fffffffa690,
D=0x39195a0)
    at
/home/hotellnx94/peeterj/clang/sources/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp:2068
#8  0x0000000000d64af6 in (anonymous
namespace)::RecordLayoutBuilder::LayoutFields (this=0x7fffffffa690,
D=0x39193f0)
    at
/home/hotellnx94/peeterj/clang/sources/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp:1835
#9  0x0000000000d63ded in (anonymous
namespace)::RecordLayoutBuilder::Layout (this=0x7fffffffa690, RD=0x39193f0)
    at
/home/hotellnx94/peeterj/clang/sources/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp:1651
#10 0x0000000000d6715d in clang::ASTContext::getASTRecordLayout
(this=0x1b38300, D=0x39193f0)
    at
/home/hotellnx94/peeterj/clang/sources/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp:2484
#11 0x0000000000d6775f in getFieldOffset (C=..., FD=0x3919600) at
/home/hotellnx94/peeterj/clang/sources/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp:2582
#12 0x0000000000d677bc in clang::ASTContext::getFieldOffset
(this=0x1b38300, VD=0x3919600)
    at
/home/hotellnx94/peeterj/clang/sources/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp:2589
#13 0x0000000000464785 in MyASTVisitor::myVisitFieldDecl
(this=0x7fffffffb700, classname=..., f=0x3919600) at ./memberdumper.h:12

I'm having trouble producing a standalone sample for this internal error.
 I'm guessing this isn't expected or a known issue.

-- 
Peeter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130225/f51c6214/attachment.html>


More information about the cfe-dev mailing list