-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Problem
When spasm-ng detects a fatal error condition, which almost always generates incorrect machine code, the spasm executable seems to always return a 0 "success" status code (at least on Linux).
It is very easy to miss the fatal error message. A non-zero status code would make it far easier for the user to detect the fatal error:
- The shell can be configured to indicate a failed command loudly to the user (using a custom prompt for example),
- If the
spasmis executed through a Makefile, themakecommand will terminate the workflow, perform any necessary clean up of intermediary files, and print a fatal error message to the user.
This problem also prevents the creation of a Continuous Integration (CI) pipeline for assembly programs, using GitHub Actions for example. Because the automation tool cannot detect a fatal error condition.
Expectation
- Any fatal error condition should return a non-zero status code to the OS
- As a corollary, any non-fatal warning condition should return a 0 status code to the OS. See for example spurious warning SW802 and status code 3 when the last flash page is less than 1024 bytes #81, which returns a fatal status code 3 for a non-fatal warning condition.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels