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 106774 Details for
Bug 238923
[1.6][compiler] Internal compiler error caused by a for loop in an initializer block
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Same fix for 3.4 maintenance stream
patch_238923_34x.txt (text/plain), 3.57 KB, created by
Olivier Thomann
on 2008-07-07 22:00:47 EDT
(
hide
)
Description:
Same fix for 3.4 maintenance stream
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2008-07-07 22:00:47 EDT
Size:
3.57 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java,v >retrieving revision 1.22.2.1 >diff -u -r1.22.2.1 StackMapFrameCodeStream.java >--- compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java 1 Jul 2008 11:24:16 -0000 1.22.2.1 >+++ compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java 8 Jul 2008 01:59:39 -0000 >@@ -536,6 +536,10 @@ > this.addFramePosition(this.position); > } > public void resetInWideMode() { >+ this.resetSecretLocals(); >+ super.resetInWideMode(); >+} >+public void resetSecretLocals() { > for (int i = 0, max = this.locals.length; i < max; i++) { > LocalVariableBinding localVariableBinding = this.locals[i]; > if (localVariableBinding != null && localVariableBinding.isSecret()) { >@@ -543,6 +547,5 @@ > localVariableBinding.resetInitializations(); > } > } >- super.resetInWideMode(); > } > } >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.92.2.1 >diff -u -r1.92.2.1 ConstructorDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java 1 Jul 2008 11:24:16 -0000 1.92.2.1 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java 8 Jul 2008 01:59:39 -0000 >@@ -335,6 +335,11 @@ > codeStream.recordPositionsFrom(0, this.bodyEnd); > classFile.completeCodeAttribute(codeAttributeOffset); > attributeNumber++; >+ if ((codeStream instanceof StackMapFrameCodeStream) >+ && needFieldInitializations >+ && declaringType.fields != null) { >+ ((StackMapFrameCodeStream) codeStream).resetSecretLocals(); >+ } > } > classFile.completeMethodInfo(methodAttributeOffset, attributeNumber); > } >#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.33.2.1 >diff -u -r1.33.2.1 StackMapAttributeTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java 1 Jul 2008 11:24:08 -0000 1.33.2.1 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java 8 Jul 2008 01:59:42 -0000 >@@ -32,7 +32,7 @@ > static { > // TESTS_PREFIX = "testBug95521"; > // TESTS_NAMES = new String[] { "testBug83127a" }; >-// TESTS_NUMBERS = new int[] { 37 }; >+// TESTS_NUMBERS = new int[] { 38 }; > // TESTS_RANGE = new int[] { 23 -1,}; > } > public static Test suite() { >@@ -6077,4 +6077,23 @@ > }, > "SUCCESS"); > } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=238923 >+ public void test038() { >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " {\n" + >+ " for (boolean b : new boolean[] {}) {}\n" + >+ " }\n" + >+ " public X() {}\n" + >+ " public X(boolean b) {}\n" + >+ " public static void main(String[] args) {\n" + >+ " System.out.print(\"SUCCESS\");\n" + >+ " }\n" + >+ "}", >+ }, >+ "SUCCESS"); >+ } > }
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 238923
:
106772
|
106773
| 106774