You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some POSIX functions we call that may raise signals in unusual situations.
For example mmap() may raise SIGBUS when a mapped file is overwritten while it's mapped, this may happen when the user overwrites a rootfs while a running emulator is using it.
The write() and read() functions used in console TTY may also raise signals such as SIGPIPE when its file descriptor is closed by the host.
When any of these signals happens the application exits unexpectedly or even crashes, while in the ideal situation an internal error could have been raised, making it possible to handle it programatically.
Possible solutions
We should review all POSIX and Linux functions we call in the emulator and review if we properly handle all possible signals for them and make the machine exit gracefully or with an error instead of a crash or unexpected exit. In the case of Lua APIs we could raise a Lua error.
Definition of Done
Handle possible signals for mmap()
Handle possible signals for read()
Handle possible signals for write()
Raise Lua errors instead of exiting
The text was updated successfully, but these errors were encountered:
Context
There are some POSIX functions we call that may raise signals in unusual situations.
For example
mmap()
may raiseSIGBUS
when a mapped file is overwritten while it's mapped, this may happen when the user overwrites a rootfs while a running emulator is using it.The
write()
andread()
functions used in console TTY may also raise signals such asSIGPIPE
when its file descriptor is closed by the host.When any of these signals happens the application exits unexpectedly or even crashes, while in the ideal situation an internal error could have been raised, making it possible to handle it programatically.
Possible solutions
We should review all POSIX and Linux functions we call in the emulator and review if we properly handle all possible signals for them and make the machine exit gracefully or with an error instead of a crash or unexpected exit. In the case of Lua APIs we could raise a Lua error.
Definition of Done
mmap()
read()
write()
The text was updated successfully, but these errors were encountered: