[cfe-dev] [BUG] libclang 3.3 pure virtual function call
Alex Turbov
i.zaufi at gmail.com
Wed Jul 17 03:59:40 PDT 2013
Hi list,
I'm using libclang to complete a C++ code in my plugin for kate
editor<http://kate-editor.org>.
Aafter upgrade to 3.3 I've got a 'pure virtual function call' from time to
time trying to use auto-complete in my other projects. Despite the bug can
be reproduced, I can't find (and show) a simple enough code snippet w/o
boost and a bunch of other dependencies :(
Right now I have the following backtrace:
#6 0x00007f943aa39329 in __GI_raise (sig=sig at entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7 0x00007f943aa3a688 in __GI_abort () at abort.c:90
#8 0x00007f943ae116c5 in __gnu_cxx::__verbose_terminate_handler () at
/storage/tmp/paludis/sys-devel-gcc-4.8.1/work/gcc-4.8.1/libstdc++-v3/libsupc++/vterminate.cc:95
#9 0x00007f943ae0f836 in __cxxabiv1::__terminate (handler=<optimized out>)
at
/storage/tmp/paludis/sys-devel-gcc-4.8.1/work/gcc-4.8.1/libstdc++-v3/libsupc++/eh_terminate.cc:38
#10 0x00007f943ae0f863 in std::terminate () at
/storage/tmp/paludis/sys-devel-gcc-4.8.1/work/gcc-4.8.1/libstdc++-v3/libsupc++/eh_terminate.cc:48
#11 0x00007f943ae1033f in __cxxabiv1::__cxa_pure_virtual () at
/storage/tmp/paludis/sys-devel-gcc-4.8.1/work/gcc-4.8.1/libstdc++-v3/libsupc++/pure.cc:50
#12 0x00007f9422d34cc0 in clang::SourceManager::loadSLocEntry
(this=this at entry=0x7f938dcdcd50, Index=Index at entry=388526,
Invalid=Invalid at entry=0x0) at SourceManager.cpp:489
#13 0x00007f9422d3646f in getLoadedSLocEntry (Invalid=0x0, Index=388526,
this=0x7f938dcdcd50) at
/storage/tmp/paludis/sys-devel-clang-3.3-r1/work/llvm-3.3.src/tools/clang/lib/Basic/../../include/clang/Basic/SourceManager.h:1462
#14 getLoadedSLocEntryByID (Invalid=0x0, ID=-388528, this=0x7f938dcdcd50)
at
/storage/tmp/paludis/sys-devel-clang-3.3-r1/work/llvm-3.3.src/tools/clang/lib/Basic/../../include/clang/Basic/SourceManager.h:1543
#15 getSLocEntryByID (ID=-388528, this=0x7f938dcdcd50) at
/storage/tmp/paludis/sys-devel-clang-3.3-r1/work/llvm-3.3.src/tools/clang/lib/Basic/../../include/clang/Basic/SourceManager.h:1537
#16 isOffsetInFileID (SLocOffset=2142953111, FID=..., this=0x7f938dcdcd50)
at
/storage/tmp/paludis/sys-devel-clang-3.3-r1/work/llvm-3.3.src/tools/clang/lib/Basic/../../include/clang/Basic/SourceManager.h:1570
#17 clang::SourceManager::getFileIDLoaded (this=this at entry=0x7f938dcdcd50,
SLocOffset=SLocOffset at entry=2142953111) at SourceManager.cpp:858
#18 0x00007f9422d364b5 in clang::SourceManager::getFileIDSlow
(this=this at entry=0x7f938dcdcd50, SLocOffset=SLocOffset at entry=2142953111) at
SourceManager.cpp:703
#19 0x00007f94225ab560 in getFileID (SpellingLoc=..., this=0x7f938dcdcd50)
at
/storage/tmp/paludis/sys-devel-clang-3.3-r1/work/llvm-3.3.src/tools/clang/tools/libclang/../../include/clang/Basic/SourceManager.h:977
#20 getDecomposedLoc (Loc=..., this=0x7f938dcdcd50) at
/storage/tmp/paludis/sys-devel-clang-3.3-r1/work/llvm-3.3.src/tools/clang/tools/libclang/../../include/clang/Basic/SourceManager.h:1092
#21 clang_getSpellingLocation (location=..., file=0x7fff1852fdc0,
line=0x7fff1852fd60, column=0x7fff1852fd70, offset=0x0) at
CXSourceLocation.cpp:314
#22 0x00007f942258a2a2 in clang_formatDiagnostic (Diagnostic=0x31bb9d0,
Options=11) at CIndexDiagnostic.cpp:254
maybe this can help (to someone) to realize that's happened... this caused
by the following code in my plugin:
CXCodeCompleteResults res = clang_codeCompleteAt( blah-blah );
...
for (unsigned i = 0; i < clang_codeCompleteGetNumDiagnostics(res); ++i)
{
CXDiagnostic diag = clang_codeCompleteGetDiagnostic(res, i);
CXString s = clang_formatDiagnostic(diag,
clang_defaultDiagnosticDisplayOptions()); // <-- CORE HERE
...
and everything (always) was fine before upgrade to 3.3... A'm I doing smth
wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130717/9f43b5ac/attachment.html>
More information about the cfe-dev
mailing list