# HG changeset patch # User aph # Date 1529683557 -3600 # Fri Jun 22 17:05:57 2018 +0100 # Branch 8205118-1 # Node ID 7b082a0f3c109745cd5fcbc7c1096186f3d21a13 # Parent 46492a7739128137dd23f190f1721af987c40454 8205118: CodeStrings::copy() assertion caused by -XX:+VerifyOops -XX:+PrintStubCode Reviewed-by: shade diff --git a/src/hotspot/share/asm/codeBuffer.cpp b/src/hotspot/share/asm/codeBuffer.cpp --- a/src/hotspot/share/asm/codeBuffer.cpp +++ b/src/hotspot/share/asm/codeBuffer.cpp @@ -1075,7 +1075,11 @@ } const char * string() const { return _string; } - intptr_t offset() const { assert(_offset >= 0, "offset for non comment?"); return _offset; } + intptr_t offset() const { + assert(_offset >= 0, "offset for non comment?"); + return offset_raw(); + } + intptr_t offset_raw() const { return _offset; } CodeString* next() const { return _next; } void set_next(CodeString* next) { _next = next; } @@ -1152,7 +1156,7 @@ CodeString* n = other._strings; CodeString** ps = &_strings; while (n != NULL) { - *ps = new CodeString(n->string(),n->offset()); + *ps = new CodeString(n->string(), n->offset_raw()); ps = &((*ps)->_next); n = n->next(); }