From ff1c62365e0be3e96fb5d8d3938283cbf101d84b Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sat, 4 Jan 2020 12:57:38 +0100 Subject: [PATCH] Remove faerie machO alignment workaround Fixes #738 --- src/constant.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/constant.rs b/src/constant.rs index 8621209765fb..d53a5dcad35b 100644 --- a/src/constant.rs +++ b/src/constant.rs @@ -303,11 +303,7 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut Module, cx: &mu let mut data_ctx = DataContext::new(); - let mut bytes = alloc.inspect_with_undef_and_ptr_outside_interpreter(0..alloc.len()).to_vec(); - // The machO backend of faerie doesn't align data objects correctly unless we do this. - while bytes.len() as u64 % 16 != 0 { - bytes.push(0xde); - } + let bytes = alloc.inspect_with_undef_and_ptr_outside_interpreter(0..alloc.len()).to_vec(); data_ctx.define(bytes.into_boxed_slice()); for &(offset, (_tag, reloc)) in alloc.relocations().iter() {