Skip to content

Commit 36b2d9c

Browse files
authored
Hotfix alignment strings (#139)
1 parent efb9e10 commit 36b2d9c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mmtk/src/object_model.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ pub unsafe fn get_so_object_size(object: ObjectReference) -> usize {
290290
dtsz + JULIA_HEADER_SIZE
291291
);
292292

293-
llt_align(dtsz + JULIA_HEADER_SIZE, 16)
293+
// NB: Strings are aligned to 8 and not to 16
294+
llt_align(dtsz + JULIA_HEADER_SIZE, 8)
294295
} else if obj_type == jl_method_type {
295296
let dtsz = std::mem::size_of::<mmtk_jl_method_t>();
296297
debug_assert!(

0 commit comments

Comments
 (0)