Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Fix implementation on arm64v8 #31

Open
npmccallum opened this issue Jul 29, 2019 · 3 comments
Open

Fix implementation on arm64v8 #31

npmccallum opened this issue Jul 29, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@npmccallum
Copy link
Collaborator

https://travis-ci.org/enarx/frenetic

At the above link you can see that tests fail for arm64v8. It is not currently known why. In order to solve this bug you need to:

  1. Remove arm64v8 from allow_failures.
  2. Make all required tests pass.
  3. Submit a pull request.
@npmccallum npmccallum added the bug Something isn't working label Jul 29, 2019
@haraldh
Copy link
Contributor

haraldh commented Oct 18, 2019

I tried hard, but could not get it to work. Looking at the assembler looks like setjmp and longjmp are not implemented.

Even trying to compile the following with clang gave me:

extern void jump_stack(void *stack, void *coro, void *func);

void jump_init(void *from[5], void *stack, void *coro, void *func) {
    if(__builtin_setjmp(from) == 0) {
        jump_stack(stack, coro, func);
    }
}

void jump_swap(void *from[5], void *into[5]) {
    if(__builtin_setjmp(from) == 0) {
        __builtin_longjmp(into, 1);
    }
}

void jump_into(void *into[5]) {
    __builtin_longjmp(into, 1);
}

Output:

running: "clang" "-Wall" "-Wextra" "-fPIC" "-o" "/tmp/build/target/debug/build/frenetic-0386846fb8b83b73/out/src/jump.o" "-c" "src/jump.c"
cargo:warning=src/jump.c:6:8: error: __builtin_setjmp is not supported for the current target
cargo:warning=    if(__builtin_setjmp(from) == 0) {
cargo:warning=       ^~~~~~~~~~~~~~~~~~~~~~
cargo:warning=src/jump.c:12:8: error: __builtin_setjmp is not supported for the current target
cargo:warning=    if(__builtin_setjmp(from) == 0) {
cargo:warning=       ^~~~~~~~~~~~~~~~~~~~~~
cargo:warning=src/jump.c:13:9: error: __builtin_longjmp is not supported for the current target
cargo:warning=        __builtin_longjmp(into, 1);
cargo:warning=        ^~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=src/jump.c:18:5: error: __builtin_longjmp is not supported for the current target
cargo:warning=    __builtin_longjmp(into, 1);
cargo:warning=    ^~~~~~~~~~~~~~~~~~~~~~~~~~

cargo:warning=4 errors generated.

@haraldh
Copy link
Contributor

haraldh commented Oct 18, 2019

I would suggest using https://github.com/zonyitoo/context-rs

@haraldh
Copy link
Contributor

haraldh commented Oct 18, 2019

a history of all my tries could be found on https://github.com/haraldh/frenetic

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants