harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vera Petrashkova (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2394) [drlvm][verifier] VM throws VerifyError when uninitialized object is used in aload/astore instructions
Date Fri, 06 Jul 2007 08:27:05 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510616

Vera Petrashkova commented on HARMONY-2394:

I think that the fix of this bug is not complete.

The original test  passes.

But if we modify TestUninitialized class and add "try-catch" statement to the "test" method
then VM still throws VerifyError.

See modified source code of the TestUninitialized class and output:
.class public TestUninitialized
.super java/lang/Object

.method public <init>()V
   invokenonvirtual java/lang/Object/<init>()V
.end method

.method public test()V
   .limit stack 2
   .limit locals 3
   .catch java/lang/VerifyError from first to second using catcher  
   new TestUninitialized
   astore 2
.end method

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 = r551077, (Jun 27 2007), Windows/ia32/msvc 1310, release build
TestUninitialized: failed: unexpected error java.lang.VerifyError: (class: TestUninitialized,
method: test()V) Uninitialized reference usage

On RI this test passes.
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)

TestUninitialized: passed

I think that this JIRA should be reopened

> [drlvm][verifier] VM throws VerifyError when uninitialized object is used in aload/astore
> ------------------------------------------------------------------------------------------------------
>                 Key: HARMONY-2394
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2394
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Rebriy
>            Assignee: Gregory Shimansky
>         Attachments: uninitialized_test.zip, verifier_uninitialized_usage.patch
> According to Java Specification uninitialized class instance can occur in a local variable
if no backward branch is taken and code isn't protected by an exception handler.
> At present verifier rejects storing or loading uninitialized class instance to a local
variable. The patch of the issue corrects uninitialized class instance usage.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message