-
Bug
-
Resolution: Fixed
-
P3
-
1.3.0
-
ladybird
-
generic, x86
-
generic, windows_nt
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2032418 | 1.4.0 | Neal Gafter | P3 | Closed | Fixed | merlin |
/**
* @test %W% %E%
* @bug 4318526
* @author iag
* @summary Verify that the compiler does not crash if a method in an inner
* class appends a character to a string declared private in the enclosing
* class.
*
* @run compile Test.java
*/
public class Test {
// s must be declared private.
private String s = "";
// This works.
/*
void m() {
s += 'a';
}
*/
class Inner {
void m() {
// This works.
// += "a";
s += 'a';
}
}
}
$ jdk13; javac Formeleditor.java
An exception has occurred in the compiler (1.3.0rc2). Please file a bug at the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi). Include your program and the following diagnostic in your report. Thank you.
java.lang.InternalError: assertion failed
at com.sun.tools.javac.v8.util.Util.assert(Util.java:25)
at com.sun.tools.javac.v8.code.Code.emitop(Code.java:365)
at com.sun.tools.javac.v8.code.Code.emitop(Code.java:376)
at com.sun.tools.javac.v8.comp.Items$StackItem.drop(Items.java:287)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:873)
at com.sun.tools.javac.v8.tree.Tree$Exec.visit(Tree.java:699)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genStats(Gen.java:401)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:507)
at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java:492)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genMethod(Gen.java:477)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:452)
at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java:441)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genClass(Gen.java:1366)
at com.sun.tools.javac.v8.JavaCompiler.genCode(JavaCompiler.java:302)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:407)
at com.sun.tools.javac.v8.Main.compile(Main.java:247)
at com.sun.tools.javac.Main.main(Main.java:16)
iris.garcia@eng 2000-03-02
===============================================================
Subject: Bug Report
Date: Thu, 7 Dec 2000 12:18:13 +0900
From: "m-takata" <###@###.###>
To: <###@###.###>
JDK1.3,JDK1.2.2 compiled error.
public class Test{
private String s = "";
public class Inner{
public void set(){
int i = 0;
s += i;
}
}
}
java.lang.InternalError: assertion failed
at com.sun.tools.javac.v8.util.Util.assert(Util.java:25)
at com.sun.tools.javac.v8.code.Code.emitop(Code.java:365)
at com.sun.tools.javac.v8.code.Code.emitop(Code.java:376)
at com.sun.tools.javac.v8.comp.Items$StackItem.drop(Items.java:287)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:873)
at com.sun.tools.javac.v8.tree.Tree$Exec.visit(Tree.java:699)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genStats(Gen.java:401)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:507)
at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java:492)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genMethod(Gen.java:477)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:452)
at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java:441)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genClass(Gen.java:1366)
at
com.sun.tools.javac.v8.JavaCompiler.genCode(JavaCompiler.java:302)
at
com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:407)
at com.sun.tools.javac.v8.Main.compile(Main.java:247)
at com.sun.tools.javac.Main.main(Main.java:16)
success sample1.
public class Test{
String s = ""; << not private
public class Inner{
public void set(){
int i = 0;
s += i;
}
}
}
success sample2.
public class Test{
private String s = "";
public class Inner{
public void set(){
String i = ""; << not primitive
s += i;
}
}
}
neal.gafter@Eng 2000-12-07
==============================================================================
* @test %W% %E%
* @bug 4318526
* @author iag
* @summary Verify that the compiler does not crash if a method in an inner
* class appends a character to a string declared private in the enclosing
* class.
*
* @run compile Test.java
*/
public class Test {
// s must be declared private.
private String s = "";
// This works.
/*
void m() {
s += 'a';
}
*/
class Inner {
void m() {
// This works.
// += "a";
s += 'a';
}
}
}
$ jdk13; javac Formeleditor.java
An exception has occurred in the compiler (1.3.0rc2). Please file a bug at the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi). Include your program and the following diagnostic in your report. Thank you.
java.lang.InternalError: assertion failed
at com.sun.tools.javac.v8.util.Util.assert(Util.java:25)
at com.sun.tools.javac.v8.code.Code.emitop(Code.java:365)
at com.sun.tools.javac.v8.code.Code.emitop(Code.java:376)
at com.sun.tools.javac.v8.comp.Items$StackItem.drop(Items.java:287)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:873)
at com.sun.tools.javac.v8.tree.Tree$Exec.visit(Tree.java:699)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genStats(Gen.java:401)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:507)
at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java:492)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genMethod(Gen.java:477)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:452)
at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java:441)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genClass(Gen.java:1366)
at com.sun.tools.javac.v8.JavaCompiler.genCode(JavaCompiler.java:302)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:407)
at com.sun.tools.javac.v8.Main.compile(Main.java:247)
at com.sun.tools.javac.Main.main(Main.java:16)
iris.garcia@eng 2000-03-02
===============================================================
Subject: Bug Report
Date: Thu, 7 Dec 2000 12:18:13 +0900
From: "m-takata" <###@###.###>
To: <###@###.###>
JDK1.3,JDK1.2.2 compiled error.
public class Test{
private String s = "";
public class Inner{
public void set(){
int i = 0;
s += i;
}
}
}
java.lang.InternalError: assertion failed
at com.sun.tools.javac.v8.util.Util.assert(Util.java:25)
at com.sun.tools.javac.v8.code.Code.emitop(Code.java:365)
at com.sun.tools.javac.v8.code.Code.emitop(Code.java:376)
at com.sun.tools.javac.v8.comp.Items$StackItem.drop(Items.java:287)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:873)
at com.sun.tools.javac.v8.tree.Tree$Exec.visit(Tree.java:699)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genStats(Gen.java:401)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:507)
at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java:492)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genMethod(Gen.java:477)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:452)
at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java:441)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genClass(Gen.java:1366)
at
com.sun.tools.javac.v8.JavaCompiler.genCode(JavaCompiler.java:302)
at
com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:407)
at com.sun.tools.javac.v8.Main.compile(Main.java:247)
at com.sun.tools.javac.Main.main(Main.java:16)
success sample1.
public class Test{
String s = ""; << not private
public class Inner{
public void set(){
int i = 0;
s += i;
}
}
}
success sample2.
public class Test{
private String s = "";
public class Inner{
public void set(){
String i = ""; << not primitive
s += i;
}
}
}
neal.gafter@Eng 2000-12-07
==============================================================================
- backported by
-
JDK-2032418 crash when inner class method appends char to private string of enclosing class
-
- Closed
-