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 73144 Details for
Bug 195317
[compiler] java.lang.ClassFormatError: Invalid pc in LineNumberTable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_195317.txt (text/plain), 2.50 KB, created by
Olivier Thomann
on 2007-07-05 13:44:12 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-07-05 13:44:12 EDT
Size:
2.50 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java,v >retrieving revision 1.152 >diff -u -r1.152 CodeStream.java >--- compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 26 Apr 2007 02:51:05 -0000 1.152 >+++ compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 5 Jul 2007 17:44:01 -0000 >@@ -5872,6 +5872,16 @@ > } > } > } >+/** >+ * Remove all entries in pcToSourceMap table that are beyond this.position >+ */ >+public void removeUnusedPcToSourceMapEntries() { >+ if (this.pcToSourceMapSize != 0) { >+ while (pcToSourceMap[pcToSourceMapSize - 2] > this.position) { >+ this.pcToSourceMapSize -= 2; >+ } >+ } >+} > public void removeVariable(LocalVariableBinding localBinding) { > if (localBinding == null) return; > if (localBinding.initializationCount > 0) { >Index: compiler/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java,v >retrieving revision 1.9 >diff -u -r1.9 BranchLabel.java >--- compiler/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java 21 Nov 2006 15:42:02 -0000 1.9 >+++ compiler/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java 5 Jul 2007 17:44:00 -0000 >@@ -205,14 +205,6 @@ > this.codeStream.position = (this.position -= 3); > this.codeStream.classFileOffset -= 3; > this.forwardReferenceCount--; >- // also update the PCs in the related debug attributes >- /* OLD CODE >- int index = codeStream.pcToSourceMapSize - 1; >- while ((index >= 0) && (codeStream.pcToSourceMap[index][1] == oldPosition)) { >- codeStream.pcToSourceMap[index--][1] = position; >- } >- */ >- // Beginning of new code > if (this.codeStream.lastEntryPC == oldPosition) { > this.codeStream.lastEntryPC = this.position; > } >@@ -233,6 +225,10 @@ > } > } > } >+ if ((this.codeStream.generateAttributes & ClassFileConstants.ATTR_LINES) != 0) { >+ // we need to remove all entries that is beyond this.position inside the pcToSourcerMap table >+ this.codeStream.removeUnusedPcToSourceMapEntries(); >+ } > } > } > for (int i = 0; i < this.forwardReferenceCount; 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 195317
:
72990
|
73144
|
73145