< prev index next >
src/hotspot/share/asm/codeBuffer.cpp
Print this page
rev 51079 : 8205118: CodeStrings::copy() assertion caused by -XX:+VerifyOops -XX:+PrintStubCode
Reviewed-by: shade
@@ -1073,11 +1073,15 @@
: _next(NULL), _offset(offset) {
_string = os::strdup(string, mtCode);
}
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; }
CodeString* first_comment() {
@@ -1150,11 +1154,11 @@
check_valid();
assert(is_null(), "Cannot copy onto non-empty CodeStrings");
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();
}
}
< prev index next >