Skip to content

Commit

Permalink
Fix atomicfields serialization for system image (#42390)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf authored Sep 26, 2021
1 parent 1790cef commit 8987bc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/staticdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -1041,14 +1041,14 @@ static void jl_write_values(jl_serializer_state *s)
jl_typename_t *tn = (jl_typename_t*)v;
jl_typename_t *newtn = (jl_typename_t*)&s->s->buf[reloc_offset];
if (tn->atomicfields != NULL) {
size_t nf = jl_svec_len(tn->names);
size_t nb = (jl_svec_len(tn->names) + 31) / 32 * sizeof(uint32_t);
uintptr_t layout = LLT_ALIGN(ios_pos(s->const_data), sizeof(void*));
write_padding(s->const_data, layout - ios_pos(s->const_data)); // realign stream
newtn->atomicfields = NULL; // relocation offset
layout /= sizeof(void*);
arraylist_push(&s->relocs_list, (void*)(reloc_offset + offsetof(jl_typename_t, atomicfields))); // relocation location
arraylist_push(&s->relocs_list, (void*)(((uintptr_t)ConstDataRef << RELOC_TAG_OFFSET) + layout)); // relocation target
ios_write(s->const_data, (char*)tn->atomicfields, nf);
ios_write(s->const_data, (char*)tn->atomicfields, nb);
}
}
else if (((jl_datatype_t*)(jl_typeof(v)))->name == jl_idtable_typename) {
Expand Down

2 comments on commit 8987bc2

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your package evaluation job has completed - possible new issues were detected. A full report can be found here.

Please sign in to comment.