[quake3-bugzilla] [Bug 4977] x86 qvm improvements

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Tue May 17 15:50:37 EDT 2011


https://bugzilla.icculus.org/show_bug.cgi?id=4977

--- Comment #20 from Eugene C. <mine at ukr.net> 2011-05-17 15:50:34 EDT ---
(In reply to comment #19)
> Well, I think I fixed that requirement with my latest SVN commit on vm_x86.c,
> specifically EmitCall(). Check it out and tell me whether I can remove the
> check

Looks like correct

> What do you need these jump labels for then, anyways?
> You certainly cannot rely on them as a security feature, not even in
> VM_MAGIC_VER2. Is it solely for the optimization pass?

Jump labels just sets barriers for optimizer, for example:

ADDRGP4 $1
JUMPV

ADDRGP4 $1
LABELV $2
JUMPV

In first case we can merge instructions and create const jump - it will be
legal and safe. While in second case we can't because JUMPV is a jump label
i.e. JUMPV can be called in any time from any code location (means - different
stack/register values). 

So potentially, all optimizations without filled jtr segment is unsafe and may
cause opstack corruption or unexpected register values

-- 
Configure bugmail: https://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