Noticed with Tremulous and (rarely) IOQuake3. When a block copy is not aligned, a warning message in the VM is displayed, and then the block copy is attempted. On a RISC processor such as MIPS, SPARC, or PowerPC, this causes a SIGBUS, crashing the game. This patch does a few things:
a) Resolves the issue by using memcpy() instead. Using memcpy() will be faster and more reliable than a for() loop copying integers since most every OS provides a fast implementation of memcpy(), including IRIX, Solaris, Linux, Windows, and MacOS X.
b) Removes code and messages to detect unaligned data. To ensure correct functionality, I first applied the memcpy() fix, then reproduced the unaligned memory copies. The game did not crash. After that I removed the detection and messages.
Created attachment 1834 [details] Fixes unaligned access issue. Fixes unaligned access issue as described above.