< prev index next >

src/share/vm/asm/codeBuffer.cpp

Print this page
rev 12037 : 8166562: C2: Suppress relocations in scratch emit.

@@ -329,10 +329,12 @@
   }
   relocate(at, rh, format);
 }
 
 void CodeSection::relocate(address at, RelocationHolder const& spec, int format) {
+  // Do not relocate in scratch buffers.
+  if (scratch_emit()) { return; }
   Relocation* reloc = spec.reloc();
   relocInfo::relocType rtype = (relocInfo::relocType) reloc->type();
   if (rtype == relocInfo::none)  return;
 
   // The assertion below has been adjusted, to also work for
< prev index next >