[Bug 3756] New: Q3VM crashes on unaligned block copy with SIGBUS

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Tue Aug 19 20:42:55 EDT 2008


           Summary: Q3VM crashes on unaligned block copy with SIGBUS
           Product: Quake 3
           Version: SVN HEAD
          Platform: SGI
        OS/Version: IRIX
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Platform
        AssignedTo: zakk at icculus.org
        ReportedBy: baggett.patrick at figglesoftware.com
         QAContact: quake3-bugzilla at icculus.org

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

Configure bugmail: http://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the quake3-bugzilla mailing list