--- a/hotspot/src/share/vm/asm/codeBuffer.cpp Thu Sep 22 18:29:15 2016 +0200
+++ b/hotspot/src/share/vm/asm/codeBuffer.cpp Wed Oct 05 15:20:35 2016 +0200
@@ -747,6 +747,10 @@
CodeBuffer dest(dest_blob);
assert(dest_blob->content_size() >= total_content_size(), "good sizing");
this->compute_final_layout(&dest);
+
+ // Set beginning of constant table before relocating.
+ dest_blob->set_ctable_begin(dest.consts()->start());
+
relocate_code_to(&dest);
// transfer strings and comments from buffer to blob
@@ -940,6 +944,9 @@
}
}
+ // Needs to be initialized when calling fix_relocation_after_move.
+ cb.blob()->set_ctable_begin(cb.consts()->start());
+
// Move all the code and relocations to the new blob:
relocate_code_to(&cb);