Closed srackham closed 2 years ago
Ah, nice catch. There was a check for this but the logic was broken, so it was exiting with whatever happened to be in rax
.
Fixed in https://github.com/titzer/virgil/commit/15c489e792016a624660641452344ba9b0b0dd62.
Verified! Thanks for the super-fast bugfix.
This is an odd one: x86-64-linux executables sometimes return a (seemingly random) non-zero exit code from the main() function:
If a second print statement is added the exit code is zero:
Explicitly returning an exit code from main() seems to resolve the problem:
The x86-linux target does not seem to exhibit this behaviour.