Skip to content

Commit 10fdb18

Browse files
bors[bot]ltratt
andauthored
Merge #18
18: Remove machine word increment. r=jacob-hughes a=ltratt As far as I can see, the addition of a machine word to the baseptr is a) not needed (I don't think that rboehm stores anything at the baseptr itself) b) causes a segfault because an extra machine word of memory is not requested in new_from_layout. Co-authored-by: Laurence Tratt <[email protected]>
2 parents e18fe52 + ac5e437 commit 10fdb18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ impl<T> GcBox<T> {
171171
.unwrap()
172172
.ptr
173173
.as_ptr() as *mut usize;
174-
NonNull::new_unchecked((base_ptr.add(1)) as *mut GcBox<MaybeUninit<T>>)
174+
NonNull::new_unchecked(base_ptr as *mut GcBox<MaybeUninit<T>>)
175175
}
176176
}
177177
}

0 commit comments

Comments
 (0)