7096010: c2: running with +PrintOptoAssembly crashes the VM when $constanttablebase is used
authorroland
Fri, 30 Sep 2011 13:47:26 +0200
changeset 10570 7f509cc48fc7
parent 10569 f5ce1108443b
child 10571 956e26fdfc4f
7096010: c2: running with +PrintOptoAssembly crashes the VM when $constanttablebase is used Summary: ADLC generates code to prepare the register string to be printed in a char array but then calls print without the char array as an argument. Reviewed-by: never
hotspot/src/share/vm/adlc/formssel.cpp
--- a/hotspot/src/share/vm/adlc/formssel.cpp	Thu Sep 29 23:09:54 2011 -0700
+++ b/hotspot/src/share/vm/adlc/formssel.cpp	Fri Sep 30 13:47:26 2011 +0200
@@ -1225,7 +1225,7 @@
   // Handle special constant table variables.
   if (strcmp(rep_var, "constanttablebase") == 0) {
     fprintf(fp, "char reg[128];  ra->dump_register(in(mach_constant_base_node_input()), reg);\n");
-    fprintf(fp, "st->print(\"%%s\");\n");
+    fprintf(fp, "    st->print(\"%%s\", reg);\n");
     return;
   }
   if (strcmp(rep_var, "constantoffset") == 0) {