# HG changeset patch # User Roland Schatz # Date 1414689281 -3600 # Node ID ff1f1481b36706dfa1983bcd04f65ebb13c20815 # Parent 62d3440228b8ab8217be648618a81d86563c3f0c Fix bug in code installer. diff -r 62d3440228b8 -r ff1f1481b367 src/share/vm/graal/graalCodeInstaller.cpp --- a/src/share/vm/graal/graalCodeInstaller.cpp Thu Oct 30 17:52:18 2014 +0100 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Thu Oct 30 18:14:41 2014 +0100 @@ -552,19 +552,18 @@ buffer.initialize_oop_recorder(_oop_recorder); + // copy the constant data into the newly created CodeBuffer + address end_data = _constants->start() + _constants_size; + memcpy(_constants->start(), data_section()->base(T_BYTE), _constants_size); + _constants->set_end(end_data); + // copy the code into the newly created CodeBuffer address end_pc = _instructions->start() + _code_size; if (!_instructions->allocates2(end_pc)) { return false; } - memcpy(_instructions->start(), code()->base(T_BYTE), code()->length()); + memcpy(_instructions->start(), code()->base(T_BYTE), _code_size); _instructions->set_end(end_pc); - - // copy the constant data into the newly created CodeBuffer - address end_data = _constants->start() + _constants_size; - memcpy(_constants->start(), data_section()->base(T_BYTE), _constants_size); - _constants->set_end(end_data); - for (int i = 0; i < data_section_patches()->length(); i++) { Handle patch = data_section_patches()->obj_at(i);