--- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp Sat Mar 16 21:44:52 2013 -0700
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp Mon Mar 18 13:19:06 2013 +0100
@@ -4262,8 +4262,13 @@
if (!VerifyOops) return;
// Pass register number to verify_oop_subroutine
- char* b = new char[strlen(s) + 50];
- sprintf(b, "verify_oop: %s: %s", reg->name(), s);
+ const char* b = NULL;
+ {
+ ResourceMark rm;
+ stringStream ss;
+ ss.print("verify_oop: %s: %s", reg->name(), s);
+ b = code_string(ss.as_string());
+ }
BLOCK_COMMENT("verify_oop {");
#ifdef _LP64
push(rscratch1); // save r10, trashed by movptr()
@@ -4297,9 +4302,14 @@
{ Label L;
testptr(tmp, tmp);
if (WizardMode) {
+ const char* buf = NULL;
+ {
+ ResourceMark rm;
+ stringStream ss;
+ ss.print("DelayedValue="INTPTR_FORMAT, delayed_value_addr[1]);
+ buf = code_string(ss.as_string());
+ }
jcc(Assembler::notZero, L);
- char* buf = new char[40];
- sprintf(buf, "DelayedValue="INTPTR_FORMAT, delayed_value_addr[1]);
STOP(buf);
} else {
jccb(Assembler::notZero, L);
@@ -4343,9 +4353,13 @@
// Address adjust(addr.base(), addr.index(), addr.scale(), addr.disp() + BytesPerWord);
// Pass register number to verify_oop_subroutine
- char* b = new char[strlen(s) + 50];
- sprintf(b, "verify_oop_addr: %s", s);
-
+ const char* b = NULL;
+ {
+ ResourceMark rm;
+ stringStream ss;
+ ss.print("verify_oop_addr: %s", s);
+ b = code_string(ss.as_string());
+ }
#ifdef _LP64
push(rscratch1); // save r10, trashed by movptr()
#endif