[prev in list] [next in list] [prev in thread] [next in thread]
List: bcel-dev
Subject: DO NOT REPLY [Bug 26839] New: -
From: bugzilla () apache ! org
Date: 2004-02-10 19:56:16
Message-ID: 20040210195616.20872.qmail () nagoya ! betaversion ! org
[Download RAW message or body]
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26839>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26839
JustIce - array store type checks stricter than native verifier
Summary: JustIce - array store type checks stricter than native
verifier
Product: BCEL
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Main
AssignedTo: bcel-dev@jakarta.apache.org
ReportedBy: apache@pjt33.f2g.net
Consider the class
public class Demo
{
public static void main(String[] args)
{
Object[] objs = new Integer[1];
objs[0] = o();
}
private static Object o()
{
return null;
}
}
It compiles fine, and
java -verify Demo
executes without errors. However,
java org.apache.bcel.verifier.Verifier Demo
complains:
Pass 3b, method number 1 ['public static void main(String[] arg0)']:
VERIFIED_REJECTED
Constraint violated in method 'public static void main(String[] arg0)':
Instruction AASTORE constraint violated: The type of 'value' ('java.lang.Object') is not assignment
compatible to the components of the array 'arrayref' refers to. ('java.lang.Integer')
etc.
The problem is that while the vmspec2 says "The type of every value stored into an array of type
reference by an aastore instruction must be assignment compatible ( §2.6.7) with the component
type of the array", the class file doesn't contain information on the compile-time component type
of the array. I suspect the native verifier does nothing about this requirement, leaving the VM to
throw an ArrayStoreException if problems arise.
Enver Haase asked me to mention in this report that while the error message says "assignment
compatible to" and the vmspec2 says "assignment compatible with", it's not a case of doing the
check the wrong way round.
---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic