Stream: git-wasmtime

Topic: wasmtime / Issue #2575 Wasmtime trap handler doesn't buil...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 12 2021 at 23:34):

repi opened Issue #2575:

Latest libc 0.2.82 changed the one of the context structures in https://github.com/rust-lang/libc/commit/990659966e14b0258a5110992735dee65333df15 for the aarch64-apple-darwin target

Repro:

cargo update -p libc
    Updating crates.io index
    Updating libc v0.2.81 -> v0.2.82

cargo check

Results in:

error[E0609]: no field `__rip` on type `__darwin_arm_thread_state64`
   --> crates/runtime/src/traphandlers.rs:169:44
    |
169 |                     (*cx.uc_mcontext).__ss.__rip as *const u8
    |                                            ^^^^^ unknown field
    |
    = note: available fields are: `__x`, `__fp`, `__lr`, `__sp`, `__pc` ... and 2 others

Been meaning to also ask what the state is of wasmtime on aarch64-apple-darwin in general also, assume it is not fully supported yet but we have been somewhat successfully using it with some issues (will file another issue soon about invalid codegen on aarch64).

view this post on Zulip Wasmtime GitHub notifications bot (Jan 12 2021 at 23:34):

repi labeled Issue #2575:

Latest libc 0.2.82 changed the one of the context structures in https://github.com/rust-lang/libc/commit/990659966e14b0258a5110992735dee65333df15 for the aarch64-apple-darwin target

Repro:

cargo update -p libc
    Updating crates.io index
    Updating libc v0.2.81 -> v0.2.82

cargo check

Results in:

error[E0609]: no field `__rip` on type `__darwin_arm_thread_state64`
   --> crates/runtime/src/traphandlers.rs:169:44
    |
169 |                     (*cx.uc_mcontext).__ss.__rip as *const u8
    |                                            ^^^^^ unknown field
    |
    = note: available fields are: `__x`, `__fp`, `__lr`, `__sp`, `__pc` ... and 2 others

Been meaning to also ask what the state is of wasmtime on aarch64-apple-darwin in general also, assume it is not fully supported yet but we have been somewhat successfully using it with some issues (will file another issue soon about invalid codegen on aarch64).

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2021 at 00:43):

cfallin commented on Issue #2575:

It looks to me like we just need to add a config case for darwin-aarch64 that reads __pc. I (sadly) don't have the right hardware to test, but would be happy to review a PR if you'd like!

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2021 at 00:49):

cfallin commented on Issue #2575:

Re: wasmtime on macOS aarch64 systems -- the main thing we'd need to do to claim 'official' support would be to add a CI runner for this platform. We support Linux/aarch64 in CI by cross-compiling and using user-mode qemu to run tests, but I'm not aware of an equivalent option for macOS. (Anyone have suggestions?) If/when GitHub adds hosted macOS aarch64 runners, or if there is some way to use emulation, then I think this would be a reasonable thing to add!

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2021 at 14:30):

clearloop commented on Issue #2575:

It looks to me like we just need to add a config case for darwin-aarch64 that reads __pc. I (sadly) don't have the right hardware to test, but would be happy to review a PR if you'd like!

Change it to __pc works!

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2021 at 11:06):

hanqo commented on Issue #2575:

It looks to me like we just need to add a config case for darwin-aarch64 that reads __pc. I (sadly) don't have the right hardware to test, but would be happy to review a PR if you'd like!

Change it to __pc works!

I am facing the same problem. Could you explain how you did to solve it?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2021 at 11:17):

hanqo commented on Issue #2575:

My current workaround is to specify libc with 0.2.81 version in my cargo.toml and it works so far.

libc = { version = '=0.2.81' }

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2021 at 11:19):

clearloop commented on Issue #2575:

I am facing the same problem. Could you explain how you did to solve it?

Well, just modifying the panicking line from (*cx.uc_mcontext).__ss.__rip as *const u8 to ...__pc.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 21 2021 at 16:48):

alexcrichton commented on Issue #2575:

I believe this was fixed in https://github.com/bytecodealliance/wasmtime/pull/2588

view this post on Zulip Wasmtime GitHub notifications bot (Jan 21 2021 at 16:48):

alexcrichton closed Issue #2575:

Latest libc 0.2.82 changed the one of the context structures in https://github.com/rust-lang/libc/commit/990659966e14b0258a5110992735dee65333df15 for the aarch64-apple-darwin target

Repro:

cargo update -p libc
    Updating crates.io index
    Updating libc v0.2.81 -> v0.2.82

cargo check

Results in:

error[E0609]: no field `__rip` on type `__darwin_arm_thread_state64`
   --> crates/runtime/src/traphandlers.rs:169:44
    |
169 |                     (*cx.uc_mcontext).__ss.__rip as *const u8
    |                                            ^^^^^ unknown field
    |
    = note: available fields are: `__x`, `__fp`, `__lr`, `__sp`, `__pc` ... and 2 others

Been meaning to also ask what the state is of wasmtime on aarch64-apple-darwin in general also, assume it is not fully supported yet but we have been somewhat successfully using it with some issues (will file another issue soon about invalid codegen on aarch64).


Last updated: Dec 23 2024 at 12:05 UTC