RFR: 8035648: Don't use Handle in java_lang_String::print

David Holmes david.holmes at oracle.com
Mon Feb 24 04:11:56 PST 2014


On 24/02/2014 7:44 PM, Stefan Karlsson wrote:
> Hi all,
> Please, review this change to let java_lang_String::print take a raw
> String oop instead of a Handle to a String oop. This change makes
> java_lang_String::print callable from code that has no HandleMark setup.

I don't think you can do that. The printing code can encounter a 
safepoint and block thus allowing a raw oop to be exposed over a 
potential GC point.


> E.g. when calling from a debugger.
> Webrev:
> http://cr.openjdk.java.net/~stefank/8035648/webrev.00/
> RFE:
> https://bugs.openjdk.java.net/browse/JDK-8035648
> thanks,
> StefanK

More information about the hotspot-dev mailing list