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 java/17488] New: Binary compatibility: must ensure static method's class remains live


At the moment, a reference to a static method won't cause the
method's class to be considered as live.  This can lead to
incorrect collection of the class.  The fix is to somehow
arrange for this class to be marked.

For static fields this is handled because we emit explicit
_Jv_InitClass calls for the field's class; the class reference
ends up in the constant pool and is marked there.

One potential fix would be to move class initialization calls
for static methods to the caller (they are now in the callee).
This might be difficult (there are many calls from C++, for instance).

-- 
           Summary: Binary compatibility: must ensure static method's class
                    remains live
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tromey at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


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


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