harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-2558) [drlvm][jit] 'new' bytecode does not cause class initialization
Date Tue, 08 May 2007 06:16:15 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexey Varlamov reassigned HARMONY-2558:
----------------------------------------

    Assignee: Alexey Varlamov

> [drlvm][jit] 'new' bytecode does not cause class initialization
> ---------------------------------------------------------------
>
>                 Key: HARMONY-2558
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2558
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Vladimir Beliaev
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-2558-reproduce-tests.zip, 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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message