@@ -160,7 +160,7 @@ CodeBlob::CodeBlob(const char* name, CodeBlobKind kind, CodeBuffer* cb, int size
160
160
}
161
161
} else {
162
162
// We need unique and valid not null address
163
- assert (_mutable_data = blob_end (), " sanity" );
163
+ assert (_mutable_data == blob_end (), " sanity" );
164
164
}
165
165
166
166
set_oop_maps (oop_maps);
@@ -177,6 +177,7 @@ CodeBlob::CodeBlob(const char* name, CodeBlobKind kind, int size, uint16_t heade
177
177
_code_offset(_content_offset),
178
178
_data_offset(size),
179
179
_frame_size(0 ),
180
+ _mutable_data_size(0 ),
180
181
S390_ONLY(_ctable_offset(0 ) COMMA)
181
182
_header_size(header_size),
182
183
_frame_complete_offset(CodeOffsets::frame_never_safe),
@@ -185,7 +186,7 @@ CodeBlob::CodeBlob(const char* name, CodeBlobKind kind, int size, uint16_t heade
185
186
{
186
187
assert (is_aligned (size, oopSize), " unaligned size" );
187
188
assert (is_aligned (header_size, oopSize), " unaligned size" );
188
- assert (_mutable_data = blob_end (), " sanity" );
189
+ assert (_mutable_data == blob_end (), " sanity" );
189
190
}
190
191
191
192
void CodeBlob::restore_mutable_data (address reloc_data) {
@@ -195,8 +196,11 @@ void CodeBlob::restore_mutable_data(address reloc_data) {
195
196
if (_mutable_data == nullptr ) {
196
197
vm_exit_out_of_memory (_mutable_data_size, OOM_MALLOC_ERROR, " codebuffer: no space for mutable data" );
197
198
}
199
+ } else {
200
+ _mutable_data = blob_end (); // default value
198
201
}
199
202
if (_relocation_size > 0 ) {
203
+ assert (_mutable_data_size > 0 , " relocation is part of mutable data section" );
200
204
memcpy ((address)relocation_begin (), reloc_data, relocation_size ());
201
205
}
202
206
}
0 commit comments