User account creation filtered due to spam.

Bug 17488 - Binary compatibility: must ensure static method's class remains live
Summary: Binary compatibility: must ensure static method's class remains live
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Blocks: 12725
  Show dependency treegraph
Reported: 2004-09-14 22:12 UTC by Tom Tromey
Modified: 2016-09-30 22:50 UTC (History)
2 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2004-12-14 00:35:34


Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2004-09-14 22:12:57 UTC
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).
Comment 1 Andrew Pinski 2016-09-30 22:50:05 UTC
Closing as won't fix as the Java front-end has been removed from the trunk.