[quake3-bugzilla] [Bug 4281] New: Uninitialized words in interpreted VM instruction stream.
bugzilla-daemon at icculus.org
bugzilla-daemon at icculus.org
Thu Sep 17 00:15:41 EDT 2009
http://bugzilla.icculus.org/show_bug.cgi?id=4281
Summary: Uninitialized words in interpreted VM instruction
stream.
Product: ioquake3
Version: SVN HEAD
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P3
Component: Platform
AssignedTo: zakk at icculus.org
ReportedBy: baggett.patrick at gmail.com
QAContact: quake3-bugzilla at icculus.org
Ryan C. Gordon <icculus at icculus.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #2126|application/octet-stream |text/plain
mime type| |
Attachment #2126|0 |1
is patch| |
Created an attachment (id=2126)
--> (http://bugzilla.icculus.org/attachment.cgi?id=2126)
Fix uninitialized sections of VM instruction stream
I know I noted before (possibly informally in the mailing list) that in
vm_interpreted.c:VM_PrepareInterpreter(), the use of a single 'pc' variable
while expanding opcodes from a byte -> word (mainly for RISC platforms where
unaligned access causes a crash) leaves 3 uninitialized instructions in the
instruction stream.
The code uses the same PC for both the int array and the byte array when
loading 32-bit values. Since the PC is updated via += 4, this causes the
integer array to have 3 uninitialized values in them. It just so happens that
the interpreter loop also does a += 4 (i.e. skipping 4 integer values), so this
bug doesn't manifest itself as a crash. The solution is almost trivial -- use a
byte PC and an integer PC and update the interpreter to not skip 4 words on
certain opcode -- which is much more consistent.
Tested on IRIX 6.5.28 on Octane2 (interpreted QVM, no *.so files)
--- Comment #1 from Ryan C. Gordon <icculus at icculus.org> 2009-09-17 00:15:37 EDT ---
(From update of attachment 2126)
Changing mimetype of attachment.
--
Configure bugmail: http://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the quake3-bugzilla
mailing list