MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / empty_data_object

Function empty_data_object

cranelift/jit/tests/basic.rs:204–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

202// This used to cause UB. See https://github.com/bytecodealliance/wasmtime/issues/7918.
203#[test]
204fn empty_data_object() {
205 let Some(isa) = isa() else {
206 return;
207 };
208 let mut module = JITModule::new(JITBuilder::with_isa(isa, default_libcall_names()));
209
210 let data_id = module
211 .declare_data("empty", Linkage::Export, false, false)
212 .unwrap();
213
214 let mut data = DataDescription::new();
215 data.define(Box::new([]));
216 module.define_data(data_id, &data).unwrap();
217}

Callers

nothing calls this directly

Calls 7

isaFunction · 0.85
default_libcall_namesFunction · 0.85
newFunction · 0.50
unwrapMethod · 0.45
declare_dataMethod · 0.45
defineMethod · 0.45
define_dataMethod · 0.45

Tested by

no test coverage detected