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

Exit Code has wrong value when unreachable is reached #3262

Closed
ptitSeb opened this issue Oct 27, 2022 · 1 comment
Closed

Exit Code has wrong value when unreachable is reached #3262

ptitSeb opened this issue Oct 27, 2022 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ptitSeb
Copy link
Contributor

ptitSeb commented Oct 27, 2022

Describe the bug

According to wasi.fyi libc test suite, when unreachable is reached, like when compiling an abort() function with WASI, the error code return should be 132. Wasmer return 1.

The C program is here

#include <stdlib.h>

int main(void) {
    abort();

    return 0;
}

wich gives the attached wasm file. But basically, it's just an unreachable reached.
abort.zip

Same issue with the "assert-false" test:

#include <assert.h>
#include <stdbool.h>

int main(void) {
    assert(false);

    return 0;
}
@ptitSeb ptitSeb added the bug Something isn't working label Oct 27, 2022
@ptitSeb ptitSeb added this to the v3.x milestone Oct 27, 2022
@ptitSeb ptitSeb self-assigned this Oct 27, 2022
@syrusakbary syrusakbary modified the milestones: v3.x, v3.0 Nov 8, 2022
@syrusakbary
Copy link
Member

This was fixed with #3266

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

No branches or pull requests

2 participants