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

ucontext_t is missing on i686-unknown-freebsd #3196

Closed
jbeich opened this issue Apr 12, 2023 · 1 comment · Fixed by #3202
Closed

ucontext_t is missing on i686-unknown-freebsd #3196

jbeich opened this issue Apr 12, 2023 · 1 comment · Fixed by #3202
Labels
C-API-request Category: API request

Comments

@jbeich
Copy link

jbeich commented Apr 12, 2023

wasmer-vm and wasmtime-runtime need ucontext_t + mcontext_t for PC and some other registers. Downstream (in ports/) this affects lapce, replibyte veloren, zellij on i386. For example,

error[E0412]: cannot find type `ucontext_t` in crate `libc`
   --> cargo-crates/wasmer-vm-2.3.0/src/trap/traphandlers.rs:219:57
    |
219 |             let ucontext = &mut *(context as *mut libc::ucontext_t);
    |                                                         ^^^^^^^^^^ not found in `libc`

error[E0412]: cannot find type `ucontext_t` in crate `libc`
   --> cargo-crates/wasmer-vm-2.3.0/src/trap/traphandlers.rs:259:45
    |
259 |         unsafe fn get_pc_sp(context: &libc::ucontext_t) -> (usize, usize) {
    |                                             ^^^^^^^^^^ not found in `libc`

error[E0412]: cannot find type `ucontext_t` in crate `libc`
   --> cargo-crates/wasmer-vm-2.3.0/src/trap/traphandlers.rs:314:54
    |
314 |         unsafe fn update_context(context: &mut libc::ucontext_t, regs: TrapHandlerRegs) {
    |                                                      ^^^^^^^^^^ not found in `libc`

Sorry, I can't provide a synthetic example.

@jbeich jbeich added the C-bug Category: bug label Apr 12, 2023
@JohnTitor JohnTitor added C-API-request Category: API request and removed C-bug Category: bug labels Apr 13, 2023
@JohnTitor
Copy link
Member

Note that it's usual that the crate doesn't have something, i.e. it's not a bug. Please use an API request template next time.

devnexen added a commit to devnexen/libc that referenced this issue Apr 14, 2023
devnexen added a commit to devnexen/libc that referenced this issue Apr 14, 2023
devnexen added a commit to devnexen/libc that referenced this issue Apr 15, 2023
bors added a commit that referenced this issue Apr 17, 2023
freebsd i686 add ucontext/mcontext

close #3196.
devnexen added a commit to devnexen/libc that referenced this issue Apr 17, 2023
bors added a commit that referenced this issue Apr 18, 2023
freebsd i686 add ucontext/mcontext

close #3196.
bors added a commit that referenced this issue Apr 18, 2023
freebsd i686 add ucontext/mcontext

close #3196.
@bors bors closed this as completed in b811b70 Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-API-request Category: API request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants