Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 201714 Details for
Bug 350612
OutOfMemoryError while "Initializing Java Tooling"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
patch.txt (text/plain), 2.28 KB, created by
Satyam Kandula
on 2011-08-18 08:43:35 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Satyam Kandula
Created:
2011-08-18 08:43:35 EDT
Size:
2.28 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: search/org/eclipse/jdt/internal/core/index/DiskIndex.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/DiskIndex.java,v >retrieving revision 1.72 >diff -u -r1.72 DiskIndex.java >--- search/org/eclipse/jdt/internal/core/index/DiskIndex.java 26 Oct 2010 17:24:15 -0000 1.72 >+++ search/org/eclipse/jdt/internal/core/index/DiskIndex.java 18 Aug 2011 12:42:15 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2010 IBM Corporation and others. >+ * Copyright (c) 2000, 2011 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -783,7 +783,13 @@ > this.sizeOfLastChunk = this.streamBuffer[this.bufferIndex++] & 0xFF; > this.documentReferenceSize = this.streamBuffer[this.bufferIndex++] & 0xFF; > this.separator = (char) (this.streamBuffer[this.bufferIndex++] & 0xFF); >- >+ long fileLength = this.indexFile.length(); >+ if (this.numberOfChunks > fileLength ) { >+ // not an accurate check, but good enough https://bugs.eclipse.org/bugs/show_bug.cgi?id=350612 >+ if (DEBUG) >+ System.out.println("Index file is corrupted " + this.indexFile); //$NON-NLS-1$ >+ throw new IOException("Index file is corrupted " + this.indexFile); //$NON-NLS-1$ >+ } > this.chunkOffsets = new int[this.numberOfChunks]; > for (int i = 0; i < this.numberOfChunks; i++) > this.chunkOffsets[i] = readStreamInt(stream); >@@ -793,6 +799,12 @@ > int size = readStreamInt(stream); > this.categoryOffsets = new HashtableOfIntValues(size); > this.categoryEnds = new HashtableOfIntValues(size); >+ if (size > fileLength) { >+ // not an accurate check, but good enough https://bugs.eclipse.org/bugs/show_bug.cgi?id=350612 >+ if (DEBUG) >+ System.out.println("Index file is corrupted " + this.indexFile); //$NON-NLS-1$ >+ throw new IOException("Index file is corrupted " + this.indexFile); //$NON-NLS-1$ >+ } > char[] previousCategory = null; > int offset = -1; > for (int i = 0; i < size; i++) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 350612
: 201714