Hi,
there is a problem when a breakpoint is set in an empty finalize()
method. Consider the following situation:
Class A has an empty finalize() method, so it would not take part in the
finalizing game (no Finalizer refs allocated for objects of that class)
. Now a user sets a breakpoint in the finalize() method and after that
we load Class B, which has Class A as its superklass. Class B does not
overrides finalize(), so we would expect objects of Class B not to take
part in the finalizer game too.
But in ClassFileParser::set_precomputed_flags(), where it is detected if
a class has a non-empty finalize() method, methodOopDesc::
is_empty_method() is called, which just checks the first bytecode of the
method. But now we have the breakpoint bytecode at this place, so
methodOopDesc::is_empty_method() thinks the method is not empty and
objects of Class B are treated as having a non-empty finalize method.
there is a problem when a breakpoint is set in an empty finalize()
method. Consider the following situation:
Class A has an empty finalize() method, so it would not take part in the
finalizing game (no Finalizer refs allocated for objects of that class)
. Now a user sets a breakpoint in the finalize() method and after that
we load Class B, which has Class A as its superklass. Class B does not
overrides finalize(), so we would expect objects of Class B not to take
part in the finalizer game too.
But in ClassFileParser::set_precomputed_flags(), where it is detected if
a class has a non-empty finalize() method, methodOopDesc::
is_empty_method() is called, which just checks the first bytecode of the
method. But now we have the breakpoint bytecode at this place, so
methodOopDesc::is_empty_method() thinks the method is not empty and
objects of Class B are treated as having a non-empty finalize method.
- relates to
-
JDK-4248826 Method entry/exit events are not created for empty methods in Hotspot VM
-
- Closed
-
-
JDK-4289162 Application is running to completion for a break point in Empty Method
-
- Closed
-
-
JDK-4990749 GetBytecodes returns breakpoint bytecodes instead of real bytecodes
-
- Closed
-
-
JDK-6244003 JVM(server) freezes with -Xcomp -XX:CompileOnly=freeze.loop and -XX:-Inline in 6.0b27
-
- Closed
-