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 155263 Details for
Bug 298250
[1.6][compiler] NegativeArraySizeException in StackMapFrame.duplicate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix + regression test
patch_298250_3.txt (text/plain), 4.09 KB, created by
Olivier Thomann
on 2010-01-04 14:10:28 EST
(
hide
)
Description:
Proposed fix + regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2010-01-04 14:10:28 EST
Size:
4.09 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java,v >retrieving revision 1.103 >diff -u -r1.103 AbstractMethodDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java 7 Mar 2009 01:08:07 -0000 1.103 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java 4 Jan 2010 19:03:51 -0000 >@@ -241,7 +241,11 @@ > // local variable attributes > codeStream.exitUserScope(this.scope); > codeStream.recordPositionsFrom(0, this.declarationSourceEnd); >- classFile.completeCodeAttribute(codeAttributeOffset); >+ try { >+ classFile.completeCodeAttribute(codeAttributeOffset); >+ } catch(NegativeArraySizeException e) { >+ throw new AbortMethod(this.scope.referenceCompilationUnit().compilationResult, null); >+ } > attributeNumber++; > } else { > checkArgumentsSize(); >Index: compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java,v >retrieving revision 1.56 >diff -u -r1.56 Clinit.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java 7 Mar 2009 00:58:57 -0000 1.56 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java 4 Jan 2010 19:03:51 -0000 >@@ -278,7 +278,11 @@ > } > // Record the end of the clinit: point to the declaration of the class > codeStream.recordPositionsFrom(0, declaringType.sourceStart); >- classFile.completeCodeAttributeForClinit(codeAttributeOffset); >+ try { >+ classFile.completeCodeAttributeForClinit(codeAttributeOffset); >+ } catch(NegativeArraySizeException e) { >+ throw new AbortMethod(this.scope.referenceCompilationUnit().compilationResult, null); >+ } > } > } > >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java,v >retrieving revision 1.106 >diff -u -r1.106 ConstructorDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java 16 Dec 2009 07:16:29 -0000 1.106 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java 4 Jan 2010 19:03:51 -0000 >@@ -357,7 +357,11 @@ > // local variable attributes > codeStream.exitUserScope(this.scope); > codeStream.recordPositionsFrom(0, this.bodyEnd); >- classFile.completeCodeAttribute(codeAttributeOffset); >+ try { >+ classFile.completeCodeAttribute(codeAttributeOffset); >+ } catch(NegativeArraySizeException e) { >+ throw new AbortMethod(this.scope.referenceCompilationUnit().compilationResult, null); >+ } > attributeNumber++; > if ((codeStream instanceof StackMapFrameCodeStream) > && needFieldInitializations >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java,v >retrieving revision 1.43 >diff -u -r1.43 StackMapAttributeTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java 4 Jan 2010 16:35:16 -0000 1.43 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java 4 Jan 2010 19:03:52 -0000 >@@ -6476,7 +6476,7 @@ > checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput); > } > // 298250 >- public void _test046() { >+ public void test046() { > Map customOptions = getCompilerOptions(); > customOptions.put(JavaCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER, JavaCore.IGNORE); > this.runNegativeTest(
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 298250
:
154840
|
154841
| 155263