interpret: support for per-byte provenance

This commit is contained in:
Ralf Jung 2022-11-06 13:00:09 +01:00
parent 452cf4f710
commit 2cef9e3d19
18 changed files with 506 additions and 291 deletions

View file

@ -159,7 +159,7 @@ fn maybe_check_static_with_link_section(tcx: TyCtxt<'_>, id: LocalDefId) {
// the consumer's responsibility to ensure all bytes that have been read
// have defined values.
if let Ok(alloc) = tcx.eval_static_initializer(id.to_def_id())
&& alloc.inner().provenance().len() != 0
&& alloc.inner().provenance().ptrs().len() != 0
{
let msg = "statics with a custom `#[link_section]` must be a \
simple list of bytes on the wasm target with no \