bytecodealliance / wasmtime

A fast and secure runtime for WebAssembly
https://wasmtime.dev/
Apache License 2.0
15.25k stars 1.29k forks source link

Cranelift: stack maps assume references are pointer-sized #1849

Open fitzgen opened 4 years ago

fitzgen commented 4 years ago

If cranelift_wasm::TargetEnvironment::reference_type is overridden to use r32 on a 64-bit arch, or overridden to use r64 on a 32-bit arch, then stack maps will be incorrect. This prevents NaN boxing on 32-bit, for example.

The reference size should probably be piped through to TargetIsa or something, and then that used as the unit of granularity for stack maps, instead of pointer size.

github-actions[bot] commented 4 years ago

Subscribe to Label Action

cc @bnjbvr

This issue or pull request has been labeled: "cranelift" Thus the following users have been cc'd because of the following labels: * bnjbvr: cranelift To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file. [Learn more.](https://github.com/bytecodealliance/subscribe-to-label-action)