harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Beliaev (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2558) [drlvm][jit] 'new' bytecode does not cause class initialization
Date Fri, 08 Dec 2006 16:13:22 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-2558?page=all ]

Vladimir Beliaev updated HARMONY-2558:
--------------------------------------

    Attachment: Test.zip

> [drlvm][jit] 'new' bytecode does not cause class initialization
> ---------------------------------------------------------------
>
>                 Key: HARMONY-2558
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2558
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Vladimir Beliaev
>         Attachments: Test.zip
>
>
> According to JVMS for 'new' bytecode:
> http://java.sun.com/docs/books/vmspec/2nd-edition/html/Instructions2.doc10.html#new
>  ... named class, array, or interface type is resolved (§5.4.3.1) ...
>  ... On successful resolution of the class, it is initialized (§5.5) if it has not already
been initialized....
> See also 5.5 Initialization (http://java.sun.com/docs/books/vmspec/2nd-edition/html/ConstantPool.doc.html#77976).
>   ... A class or interface may be initialized only as a result of:
>       o  The execution of any one of the Java virtual machine instructions new, getstatic,...
> So, executing 'new' bytecode must cause a class initialization (in particlar <clinit>
call). The attached test shows it is not true for recent version of DRLVM. In this test the
<clinit> produce exception which is supposed to be catched in 'main' method.
> The issue is not reproducible with interpreter (-Xint) - marking this bug as JIT one.
> To prepare the test please build attached Jasm_part.jj first; then build Test.java.
> Test output is:
> $ deploy/jre/bin/java -showversion Test
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or
its licensors, as applicable.
> java version "1.5.0" 
> pre-alpha : not complete or compatible
> svn = r482108, (Dec  8 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> FAILED: no exception...
> $ deploy/jre/bin/java -showversion -Xint Test
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or
its licensors, as applicable.
> java version "1.5.0" 
> pre-alpha : not complete or compatible
> svn = r482108, (Dec  8 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> PASSED...
> $ java -showversion Test
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System
optimized over throughput (initial strategy singleparpar))
> PASSED...
> Thanks
> Vladimir

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message