--- a/hotspot/src/share/vm/opto/compile.cpp Wed Oct 05 13:35:57 2016 +0200
+++ b/hotspot/src/share/vm/opto/compile.cpp Thu Sep 22 18:33:47 2016 +0200
@@ -574,6 +574,10 @@
buf.consts()->initialize_shared_locs(&locs_buf[lsize * 0], lsize);
buf.insts()->initialize_shared_locs( &locs_buf[lsize * 1], lsize);
buf.stubs()->initialize_shared_locs( &locs_buf[lsize * 2], lsize);
+ // Mark as scratch buffer.
+ buf.consts()->set_scratch_emit();
+ buf.insts()->set_scratch_emit();
+ buf.stubs()->set_scratch_emit();
// Do the emission.