-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.2.0
-
sparc
-
solaris_2.5.1
Name: szC45993 Date: 06/02/98
The test below shows that jdk1.2b4H throws wrong exception for unexisting
interface javasoft/sqe/tests/vm/classfmt/cpl/cplcls002/cplcls00206m1\u1E00/cplcls00206m1i (\u1E00 - LATIN CAPITAL LETTER A WITH RING BELOW):
novo7% setenv CLASSPATH /export/home1/JAVA/tmp/../classes:/export/ld22/java/oul/JT20/javatest.jar:/export/home1/JAVA/workdir4/classes:/export/ld22/java/gvv/JT20/classes
novo7% /export/ld14/java/dest/jdk1.2b4H/solaris/bin/java -verify javasoft.sqe.tests.vm.classfmt.cpl.cplcls002.cplcls00206m1.cplcls00206m1
Exception 2 (bad):java.lang.ClassFormatError: javasoft/sqe/tests/vm/classfmt/cpl/cplcls002/cplcls00206m1?/cplcls00206m1i (Bad magic number)
novo7% echo $status
97
novo7%
How can the bad magic number exist for the unexisting interface?
The test works fine for jdk1.2b3N:
novo7% /export/ld14/java/dest/jdk1.2b3N/solaris/bin/java -verify javasoft.sqe.tests.vm.classfmt.cpl.cplcls002.cplcls00206m1.cplcls00206m1
Exception 2:java.lang.NoClassDefFoundError: javasoft/sqe/tests/vm/classfmt/cpl/cplcls002/cplcls00206m1?/cplcls00206m1i
novo7% echo $status
95
novo7%
SOURCE:
--------------------- cplcls00206m1.java
/* Ident: @(#)cplcls00206m1.java generated from: @(#)cplcls00206m.jmpp 1.1 98/04/06 */
/* Copyright 6/2/98 Sun Microsystems, Inc. All Rights Reserved */
package javasoft.sqe.tests.vm.classfmt.cpl.cplcls002.cplcls00206m1;
import java.io.PrintStream;
public class cplcls00206m1 {
public static int run(String argv[], PrintStream out) {
int res = 0/*STATUS_PASSED*/;
try {
Class oClass = Class.forName("javasoft.sqe.tests.vm.classfmt.cpl.cplcls002.cplcls00206m1.cplcls00206m1o");
} catch (NoClassDefFoundError e) {
out.println("Exception 2:"+e.toString());
} catch (ClassNotFoundException e) {
out.println("Exception 2:"+e.toString());
} catch (Throwable e) {
out.println("Exception 2 (bad):"+e.toString());
res = 2/*STATUS_FAILED*/;
}
return res;
}
public static void main(String args[]) {
System.exit( run(args, System.out) + 95/*STATUS_TEMP*/ );
}
}
--------------------- cplcls00206m1g.jasm
/* Ident: @(#)cplcls00206m1g.jasm generated from: @(#)cplcls00206m.jmpp 1.1 98/04/06 */
/* Copyright 6/2/98 Sun Microsystems, Inc. All Rights Reserved */
package javasoft/sqe/tests/vm/classfmt/cpl/cplcls002/cplcls00206m1;
class cplcls00206m1o
//Right:
//implements "javasoft/sqe/tests/vm/classfmt/cpl/cplcls002/cplcls00206m1/cplcls00206m1i"
//Wrong:
implements "javasoft/sqe/tests/vm/classfmt/cpl/cplcls002/cplcls00206m1\u1E00/cplcls00206m1i"
// ^^^^^^ special unicode letter
{
public Field i1:I;
}
======================================================================
Hook 5(hook5): test
======================================================================
The bug can be reproduced with appletviewer. Look at the attachement and
ask Steve Fleming for more details.
###@###.### 1999-04-19