Fix emulator arithmetic bugs #6
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
executing certain instructions causes the emulator thread to hard crash, silently breaking the program.
this most often happens with integer overflow, suggesting that there's cases we're not handling properly.
Potential steps for a fix:
Steps we should take to make debugging future issues of this nature easier:
.unwrap() .expect() panic!()etc are used within the codebase. we should verify that these methods are only called in places where errors should be impossible.(this is just one example, I've had this happen a few times. will look into this issue later.)
found one of the causes of the issue. a program I was writing read a word that crossed the boundary between two blocks, resulting in an block offset of 255 leading to an overflow.
conclusions:
steps to fix: