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 is always random memory garbage #115

Open
rtfeldman opened this issue Nov 1, 2023 · 0 comments
Open

Exit code is always random memory garbage #115

rtfeldman opened this issue Nov 1, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@rtfeldman
Copy link
Contributor

This is because in host.c we use the return value of rust_main() as the exit code, but rust_main doesn't return anything right now.

To fix this:

  • Change rust_main to return i32
  • If roc_main's task returns Ok {} then return 0
  • If roc_main's task returns an Err then return the 32-bit integer inside it
@rtfeldman rtfeldman added the bug Something isn't working label Nov 1, 2023
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

1 participant