about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/constant.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/constant.rs b/src/constant.rs
index c4000599394..690e8fe0e20 100644
--- a/src/constant.rs
+++ b/src/constant.rs
@@ -388,13 +388,7 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut dyn Module, cx: &mut Constant
         }
 
         let bytes = alloc.inspect_with_uninit_and_ptr_outside_interpreter(0..alloc.len()).to_vec();
-        if bytes.is_empty() {
-            // FIXME(bytecodealliance/wasmtime#7918) cranelift-jit has a bug where it causes UB on
-            // empty data objects
-            data.define(Box::new([0]));
-        } else {
-            data.define(bytes.into_boxed_slice());
-        }
+        data.define(bytes.into_boxed_slice());
 
         for &(offset, prov) in alloc.provenance().ptrs().iter() {
             let alloc_id = prov.alloc_id();