xref: /aosp_15_r20/external/apache-commons-bcel/TODO.JustIce (revision 0c56280ab0842982c46a149f7b9eaa497e31e292)
1*0c56280aSSorin Basca
2*0c56280aSSorin Basca$Id$
3*0c56280aSSorin Basca
4*0c56280aSSorin Basca"TODO" list for JustIce, the Java Class File Verifier by Enver Haase.
5*0c56280aSSorin Basca
6*0c56280aSSorin Basca- JustIce uses object generalization during pass 3b,  as  supposed  by
7*0c56280aSSorin BascaSun.  However,  there  are better methods such as the idea proposed by
8*0c56280aSSorin BascaStaerk et al.: using sets of object types.  JustIce  may  reject  code
9*0c56280aSSorin Bascathat is not rejected by traditional JVM-internal  verifiers  for  this
10*0c56280aSSorin Bascareason. The corresponding checks all have  some  "TODO"  tag  with  an
11*0c56280aSSorin Bascaexplanation; they're all in the 'InstConstraintVisitor.java' file.
12*0c56280aSSorin BascaUsers  encountering  problems  should  simply  comment  them  out  (or
13*0c56280aSSorin Bascauncomment them) as they like. The default is some setting  that  works
14*0c56280aSSorin Bascawell when using
15*0c56280aSSorin Basca$ java org.apache.bcel.verifier.TransitiveHull java.lang.String
16*0c56280aSSorin Bascameaning there are no rejects caused by the above problem in a  lot  of
17*0c56280aSSorin Bascausual classes.
18*0c56280aSSorin Basca
19*0c56280aSSorin Basca- There are a few bugs concerning access rights of referenced  methods
20*0c56280aSSorin Bascaand  probably  fields.  The  tests  for access rights that Sun defines
21*0c56280aSSorin Bascashould happen in pass four (which JustIce performs during pass 3a) are
22*0c56280aSSorin Bascaunintentionally  omitted.  This also happened to Sun and IBM with some
23*0c56280aSSorin Bascaof their version 1.3 JVMs. Thanks Markus Dahm.
24*0c56280aSSorin Basca
25*0c56280aSSorin Basca- There are bugs because of an ambiguity in the Java  Virtual  Machine
26*0c56280aSSorin BascaSpecification,  Second  Edition.  These have to do with inheritance: A
27*0c56280aSSorin Bascamethod invocation like MyObject::equals(Object) is considered illegal,
28*0c56280aSSorin Bascaif  MyObject  has  no  overriding  definition  of  equals(Object). Sun
29*0c56280aSSorin Bascaclarified this issue via electronic mail:  the  invocation  is  legal,
30*0c56280aSSorin Bascabecause  MyObject  inherits  the  member  function equals(Object) from
31*0c56280aSSorin BascaObject::equals(Object). The search algorithms don't seem to be trivial
32*0c56280aSSorin Bascabecause  interfaces  can  not  only  specify methods, but also declare
33*0c56280aSSorin Bascafields. Also, access modifiers have to be honoured (see above).
34*0c56280aSSorin Basca
35*0c56280aSSorin Basca- It is not verified if classes that propose they would  implement  an
36*0c56280aSSorin Bascainterface _really_ implement all the methods.
37*0c56280aSSorin Basca
38*0c56280aSSorin Basca- It is not verified that interfaces are actually  tagged  'abstract'.
39*0c56280aSSorin Basca
40*0c56280aSSorin Basca- The InstructionContext.getSuccessors() method may return the same
41*0c56280aSSorin Bascasuccessor more than one time. For performance reasons the ControlFlow-
42*0c56280aSSorin BascaGraph.InstructionContextImpl class should return an array where the
43*0c56280aSSorin Bascasuccessors are pairwise disjoint. It should also be cached so that we
44*0c56280aSSorin Bascadon't have to do this calculation every time.
45*0c56280aSSorin Basca
46*0c56280aSSorin Basca***End of File***
47