This is the mail archive of the java-prs@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcj/25265] New: linking BC-compiled classes with incompatible changes


Imagine the following situation:

class T {
  void test(){
       M.staticMethod(); // a
       new M().method(); // b
       M.staticField = "FOO"; // c
       new M().field = "FOO"; // d
  }
}

class M{
   static void staticMethod(){}
   void method(){}
   static String staticField;
   String field;
}

Compile this and then replace the class file of M with the compiled code of
this class: class M{}

The JDK has no problems loading the T class and when running each the statement
*on its own* it would throw a NoSuchMethodError (case a & b) or a
NoSuchFieldError (case c & d).

GIJ should do the same.


-- 
           Summary: linking BC-compiled classes with incompatible changes
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: thebohemian at gmx dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25265


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]