Review Request 125186: limite the max search depth for oldcpp::CodeCompletionContext::addOverridableItems()
Zhang HuiJie
yitianbuji at gmail.com
Mon Sep 14 00:55:49 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125186/
-----------------------------------------------------------
(Updated 九月 14, 2015, 8:55 a.m.)
Review request for KDevelop.
Changes
-------
Sorry for the prev patch with "static"
Repository: kdevelop
Description
-------
In some cases for big projects, oldcpp::CodeCompletionContext::addOverridableItems() may get into an endless loop and finally kdevelop breakdown. The debug ouput show that the depth was more than 50000.
Diffs (updated)
-----
languages/cpp/codecompletion/context.cpp 81927f9
Diff: https://git.reviewboard.kde.org/r/125186/diff/
Testing
-------
Here is the debug output:
0x00007ffff18ab995 in KDevelop::AbstractType::hash (this=this at entry=0x7fff181991c0) at /build/buildd/kdevplatform-1.7.1/language/duchain/types/abstracttype.cpp:110
110 /build/buildd/kdevplatform-1.7.1/language/duchain/types/abstracttype.cpp: No such file or directory.
(gdb) where
#0 0x00007ffff18ab995 in KDevelop::AbstractType::hash (this=this at entry=0x7fff181991c0) at /build/buildd/kdevplatform-1.7.1/language/duchain/types/abstracttype.cpp:110
#1 0x00007ffff18afde6 in KDevelop::FunctionType::hash (this=0x7fff181991c0) at /build/buildd/kdevplatform-1.7.1/language/duchain/types/functiontype.cpp:188
#2 0x00007ffff18ca077 in hash (this=0x7fff1fec41e0) at /build/buildd/kdevplatform-1.7.1/language/duchain/repositories/typerepository.cpp:45
#3 KDevelop::ItemRepository<KDevelop::AbstractTypeData, KDevelop::AbstractTypeDataRequest, true, true, 0u, 1048576u>::index (this=0xc256b0, request=...)
at /build/buildd/kdevplatform-1.7.1/language/duchain/repositories/itemrepository.h:1141
#4 0x00007ffff18c332a in KDevelop::TypeRepository::indexForType (input=...) at /build/buildd/kdevplatform-1.7.1/language/duchain/repositories/typerepository.cpp:107
#5 0x00007ffff18abc60 in KDevelop::AbstractType::indexed (this=<optimized out>) at /build/buildd/kdevplatform-1.7.1/language/duchain/types/abstracttype.cpp:99
#6 0x00007ffff17ff354 in KDevelop::DUContext::Checker::check (this=this at entry=0x7fff1fec42f0, declaration=declaration at entry=0x7fff04f84a00)
at /build/buildd/kdevplatform-1.7.1/language/duchain/ducontext.cpp:635
#7 0x00007ffff17ffa8c in KDevelop::DUContext::findLocalDeclarationsInternal (this=0x34d6650, identifier=..., position=..., dataType=..., ret=..., flags=...)
at /build/buildd/kdevplatform-1.7.1/language/duchain/ducontext.cpp:681
#8 0x00007fff20982761 in Cpp::CppDUContext<KDevelop::DUContext>::findLocalDeclarationsInternal (this=0x34d6650, identifier=..., position=..., dataType=..., ret=..., source=0x0,
flags=...) at /home/cfd/Projects/KDE/Kdevelop/languages/cpp/cppduchain/cppducontext.h:388
#9 0x00007ffff17fe2b4 in KDevelop::DUContext::findLocalDeclarations (this=0x34d6650, identifier=..., position=..., topContext=<optimized out>, dataType=..., flags=...)
at /build/buildd/kdevplatform-1.7.1/language/duchain/ducontext.cpp:585
#10 0x00007fff20ed30f8 in Cpp::getOverridable (base=0x7fff04f84a00, current=0x7fff1fec3ffc, overridable=...,
completionContext=<error reading variable: Cannot access memory at address 0x0>, depth=55472) at /home/cfd/Projects/KDE/Kdevelop/languages/cpp/codecompletion/context.cpp:1304
#11 0x00007fff20ed34cf in Cpp::getOverridable (base=0x34d6650, current=0x7fff1fec3ffc, overridable=...,
completionContext=<error reading variable: Cannot access memory at address 0x0>, depth=55472) at /home/cfd/Projects/KDE/Kdevelop/languages/cpp/codecompletion/context.cpp:1310
#12 0x00007fff20ed34cf in Cpp::getOverridable (base=0x34d6650, current=0x7fff1fec3ffc, overridable=...,
completionContext=<error reading variable: Cannot access memory at address 0x0>, depth=55472) at /home/cfd/Projects/KDE/Kdevelop/languages/cpp/codecompletion/context.cpp:1310
Thanks,
Zhang HuiJie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150914/43000212/attachment-0001.html>
More information about the KDevelop-devel
mailing list