<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/125186/">https://git.reviewboard.kde.org/r/125186/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/125186/diff/1/?file=402895#file402895line1290" style="color: black; font-weight: bold; text-decoration: underline;">languages/cpp/codecompletion/context.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">CodeCompletionContext::AccessType CodeCompletionContext::accessType() const {</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">1290</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">current</span><span class="p">)</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">1290</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">static</span> <span class="kt">int</span> <span class="n">maxDepth</span> <span class="o">=</span> <span class="mi">5000</span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">remove the static and make it const.</p></pre>
</div>
</div>
<br />
<p>- Milian Wolff</p>
<br />
<p>On September 12th, 2015, 8:53 a.m. UTC, Zhang HuiJie wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDevelop.</div>
<div>By Zhang HuiJie.</div>
<p style="color: grey;"><i>Updated Sept. 12, 2015, 8:53 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdevelop
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Here is the debug output:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">0x00007ffff18ab995 in KDevelop::AbstractType::hash (this=this@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</p>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">0 0x00007ffff18ab995 in KDevelop::AbstractType::hash (this=this@entry=0x7fff181991c0) at /build/buildd/kdevplatform-1.7.1/language/duchain/types/abstracttype.cpp:110</h1>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">1 0x00007ffff18afde6 in KDevelop::FunctionType::hash (this=0x7fff181991c0) at /build/buildd/kdevplatform-1.7.1/language/duchain/types/functiontype.cpp:188</h1>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">2 0x00007ffff18ca077 in hash (this=0x7fff1fec41e0) at /build/buildd/kdevplatform-1.7.1/language/duchain/repositories/typerepository.cpp:45</h1>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">3 KDevelop::ItemRepository<KDevelop::AbstractTypeData, KDevelop::AbstractTypeDataRequest, true, true, 0u, 1048576u>::index (this=0xc256b0, request=...)</h1>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">at /build/buildd/kdevplatform-1.7.1/language/duchain/repositories/itemrepository.h:1141
</pre></div>
</p>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">4 0x00007ffff18c332a in KDevelop::TypeRepository::indexForType (input=...) at /build/buildd/kdevplatform-1.7.1/language/duchain/repositories/typerepository.cpp:107</h1>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">5 0x00007ffff18abc60 in KDevelop::AbstractType::indexed (this=<optimized out>) at /build/buildd/kdevplatform-1.7.1/language/duchain/types/abstracttype.cpp:99</h1>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">6 0x00007ffff17ff354 in KDevelop::DUContext::Checker::check (this=this@entry=0x7fff1fec42f0, declaration=declaration@entry=0x7fff04f84a00)</h1>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">at /build/buildd/kdevplatform-1.7.1/language/duchain/ducontext.cpp:635
</pre></div>
</p>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">7 0x00007ffff17ffa8c in KDevelop::DUContext::findLocalDeclarationsInternal (this=0x34d6650, identifier=..., position=..., dataType=..., ret=..., flags=...)</h1>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">at /build/buildd/kdevplatform-1.7.1/language/duchain/ducontext.cpp:681
</pre></div>
</p>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">8 0x00007fff20982761 in Cpp::CppDUContext<KDevelop::DUContext>::findLocalDeclarationsInternal (this=0x34d6650, identifier=..., position=..., dataType=..., ret=..., source=0x0,</h1>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">flags=...) at /home/cfd/Projects/KDE/Kdevelop/languages/cpp/cppduchain/cppducontext.h:388
</pre></div>
</p>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">9 0x00007ffff17fe2b4 in KDevelop::DUContext::findLocalDeclarations (this=0x34d6650, identifier=..., position=..., topContext=<optimized out>, dataType=..., flags=...)</h1>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">at /build/buildd/kdevplatform-1.7.1/language/duchain/ducontext.cpp:585
</pre></div>
</p>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">10 0x00007fff20ed30f8 in Cpp::getOverridable (base=0x7fff04f84a00, current=0x7fff1fec3ffc, overridable=...,</h1>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">completionContext=<error reading variable: Cannot access memory at address 0x0>, depth=55472) at /home/cfd/Projects/KDE/Kdevelop/languages/cpp/codecompletion/context.cpp:1304
</pre></div>
</p>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">11 0x00007fff20ed34cf in Cpp::getOverridable (base=0x34d6650, current=0x7fff1fec3ffc, overridable=...,</h1>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">completionContext=<error reading variable: Cannot access memory at address 0x0>, depth=55472) at /home/cfd/Projects/KDE/Kdevelop/languages/cpp/codecompletion/context.cpp:1310
</pre></div>
</p>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">12 0x00007fff20ed34cf in Cpp::getOverridable (base=0x34d6650, current=0x7fff1fec3ffc, overridable=...,</h1>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">completionContext=<error reading variable: Cannot access memory at address 0x0>, depth=55472) at /home/cfd/Projects/KDE/Kdevelop/languages/cpp/codecompletion/context.cpp:1310
</pre></div>
</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>languages/cpp/codecompletion/context.cpp <span style="color: grey">(81927f9)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/125186/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>