mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-19 23:15:24 +02:00
Bug 503988 - UI thread got blocked by the reconciler
Added protection against infinite loops. Change-Id: I0cc3f34ddb9db9d3a23dfd111836a2a84620e8d9
This commit is contained in:
parent
04e31e3fae
commit
9f7af7a493
1 changed files with 7 additions and 3 deletions
|
@ -184,9 +184,13 @@ public class HashTable implements Cloneable {
|
|||
} else {
|
||||
// Need to link.
|
||||
j--;
|
||||
int k;
|
||||
while ((k = nextTable[j]) != 0 && k != j + 1) {
|
||||
j = k - 1;
|
||||
int maxIterationsLeft = nextTable.length;
|
||||
for (int k; (k = nextTable[j]) != 0 && k != j + 1; j = k - 1) {
|
||||
if (--maxIterationsLeft < 0) {
|
||||
throw new IllegalStateException("i = " + i + " hash = " + hash + " j = " + j //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
+ "\n nextTable = " + Arrays.toString(nextTable) //$NON-NLS-1$
|
||||
+ "\n hashTable = " + Arrays.toString(hashTable)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
nextTable[j] = i + 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue