mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
185828: add workaround which limits recursion depth of symbol look-up in class hierarchy
This commit is contained in:
parent
7a63a01f7b
commit
8aa0195243
2 changed files with 7 additions and 2 deletions
|
@ -60,7 +60,7 @@ public class IndexCPPBindingResolutionBugs extends IndexBindingResolutionTestBas
|
||||||
// void foo() {
|
// void foo() {
|
||||||
// C<int>::unresolvable();
|
// C<int>::unresolvable();
|
||||||
// };
|
// };
|
||||||
public void _test185828() throws Exception {
|
public void test185828() throws Exception {
|
||||||
// Bug 185828 reports a StackOverflowException is thrown before we get here.
|
// Bug 185828 reports a StackOverflowException is thrown before we get here.
|
||||||
// That the SOE is thrown is detected in BaseTestCase via an Error IStatus
|
// That the SOE is thrown is detected in BaseTestCase via an Error IStatus
|
||||||
|
|
||||||
|
|
|
@ -1170,7 +1170,12 @@ public class CPPSemantics {
|
||||||
data.inheritanceChain = new ObjectSet( 2 );
|
data.inheritanceChain = new ObjectSet( 2 );
|
||||||
|
|
||||||
data.inheritanceChain.put( lookIn );
|
data.inheritanceChain.put( lookIn );
|
||||||
|
|
||||||
|
// workaround to fix 185828
|
||||||
|
if(data.inheritanceChain.size() > 20) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
int size = bases.length;
|
int size = bases.length;
|
||||||
for( int i = 0; i < size; i++ )
|
for( int i = 0; i < size; i++ )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue