The following assert in oop:register_oop() is invalid:
assert (fr.pc(), "should point to a vm frame");
Some platforms may not be able to produce a valid current frame, thus fr.pc() will be NULL. This assert should be removed to so those platforms will still work with -XX:+ CheckUnhandledOops. They just won't be able to print the pc if an invalid unhandled oop if one is discovered.
The code in UnhandledOops::clear_unhandled_oops() that prints the PC on error could also be improved a bit by printing out symbolic information like backtraces do. It just needs to call os::dll_address_to_library_name(pc) like frame:print_C_frame() does. A further improvement would be to have oop::register_oop() save the stack trace by calling os::get_native_stack() like NMT does. Then it can recreate the stack trace if there is an error.
assert (fr.pc(), "should point to a vm frame");
Some platforms may not be able to produce a valid current frame, thus fr.pc() will be NULL. This assert should be removed to so those platforms will still work with -XX:+ CheckUnhandledOops. They just won't be able to print the pc if an invalid unhandled oop if one is discovered.
The code in UnhandledOops::clear_unhandled_oops() that prints the PC on error could also be improved a bit by printing out symbolic information like backtraces do. It just needs to call os::dll_address_to_library_name(pc) like frame:print_C_frame() does. A further improvement would be to have oop::register_oop() save the stack trace by calling os::get_native_stack() like NMT does. Then it can recreate the stack trace if there is an error.
- relates to
-
JDK-8163900 os::current_frame has a misleading name
-
- Closed
-