Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wasm pointer misalignment issues on Apple silicon #1778

Merged
merged 4 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fix wasm pointer misalignment issues on Apple silicon devices.
([\#1778](https://github.com/anoma/namada/pull/1778))
42 changes: 14 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ tiny-hderive.workspace = true
toml.workspace = true
tracing.workspace = true
wasm-instrument = {version = "0.4.0", features = ["sign_ext"], optional = true}
wasmer = {version = "=2.3.0", optional = true}
wasmer-cache = {version = "=2.3.0", optional = true}
wasmer-compiler-singlepass = {version = "=2.3.0", optional = true}
wasmer-engine-dylib = {version = "=2.3.0", optional = true}
wasmer-engine-universal = {version = "=2.3.0", optional = true}
wasmer-vm = {version = "2.3.0", optional = true}
wasmer = {git = "https://github.com/heliaxdev/wasmer", rev = "833721a1b21cd192e7f044abe2139d03ba291149", optional = true}
wasmer-cache = {git = "https://github.com/heliaxdev/wasmer", rev = "833721a1b21cd192e7f044abe2139d03ba291149", optional = true}
wasmer-compiler-singlepass = {git = "https://github.com/heliaxdev/wasmer", rev = "833721a1b21cd192e7f044abe2139d03ba291149", optional = true}
wasmer-engine-dylib = {git = "https://github.com/heliaxdev/wasmer", rev = "833721a1b21cd192e7f044abe2139d03ba291149", optional = true}
wasmer-engine-universal = {git = "https://github.com/heliaxdev/wasmer", rev = "833721a1b21cd192e7f044abe2139d03ba291149", optional = true}
wasmer-vm = {git = "https://github.com/heliaxdev/wasmer", rev = "833721a1b21cd192e7f044abe2139d03ba291149", optional = true}
wasmparser.workspace = true
zeroize.workspace = true

Expand Down
8 changes: 8 additions & 0 deletions shared/src/vm/wasm/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,10 @@ mod tests {
/// Test that when a transaction wasm goes over the stack-height limit, the
/// execution is aborted.
#[test]
// NB: Disabled on aarch64 macOS since a fix for
// https://github.com/wasmerio/wasmer/issues/4072
// reduced the available stack space on mac
#[cfg_attr(all(target_arch = "aarch64", target_os = "macos"), ignore)]
fn test_tx_stack_limiter() {
// Because each call into `$loop` inside the wasm consumes 5 stack
// heights except for the terminal call, this should hit the stack
Expand All @@ -509,6 +513,10 @@ mod tests {
/// Test that when a VP wasm goes over the stack-height limit, the execution
/// is aborted.
#[test]
// NB: Disabled on aarch64 macOS since a fix for
// https://github.com/wasmerio/wasmer/issues/4072
// reduced the available stack space on mac
#[cfg_attr(all(target_arch = "aarch64", target_os = "macos"), ignore)]
fn test_vp_stack_limiter() {
// Because each call into `$loop` inside the wasm consumes 5 stack
// heights except for the terminal call, this should hit the stack
Expand Down
42 changes: 14 additions & 28 deletions wasm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading