@@ -160,7 +160,7 @@ CodeBlob::CodeBlob(const char* name, CodeBlobKind kind, CodeBuffer* cb, int size
160160 }
161161 } else {
162162 // We need unique and valid not null address
163- assert (_mutable_data = blob_end (), " sanity" );
163+ assert (_mutable_data == blob_end (), " sanity" );
164164 }
165165
166166 set_oop_maps (oop_maps);
@@ -177,6 +177,7 @@ CodeBlob::CodeBlob(const char* name, CodeBlobKind kind, int size, uint16_t heade
177177 _code_offset(_content_offset),
178178 _data_offset(size),
179179 _frame_size(0 ),
180+ _mutable_data_size(0 ),
180181 S390_ONLY(_ctable_offset(0 ) COMMA)
181182 _header_size(header_size),
182183 _frame_complete_offset(CodeOffsets::frame_never_safe),
@@ -185,7 +186,7 @@ CodeBlob::CodeBlob(const char* name, CodeBlobKind kind, int size, uint16_t heade
185186{
186187 assert (is_aligned (size, oopSize), " unaligned size" );
187188 assert (is_aligned (header_size, oopSize), " unaligned size" );
188- assert (_mutable_data = blob_end (), " sanity" );
189+ assert (_mutable_data == blob_end (), " sanity" );
189190}
190191
191192void CodeBlob::restore_mutable_data (address reloc_data) {
@@ -195,8 +196,11 @@ void CodeBlob::restore_mutable_data(address reloc_data) {
195196 if (_mutable_data == nullptr ) {
196197 vm_exit_out_of_memory (_mutable_data_size, OOM_MALLOC_ERROR, " codebuffer: no space for mutable data" );
197198 }
199+ } else {
200+ _mutable_data = blob_end (); // default value
198201 }
199202 if (_relocation_size > 0 ) {
203+ assert (_mutable_data_size > 0 , " relocation is part of mutable data section" );
200204 memcpy ((address)relocation_begin (), reloc_data, relocation_size ());
201205 }
202206}
0 commit comments