On 26/07/2013 08:53, Ludwig Nussel wrote: > Dominic Fandrey wrote: >> On 25/07/2013 15:25, Ludwig Nussel wrote: >>> Dominic Fandrey wrote: >>>> On 23/07/2013 01:36, Tim Angus wrote: >>>>> On Mon, 22 Jul 2013 14:36:18 -0500 Harley wrote: >>>>>> It looks like the culprit is the range check (MASK_REG in the new vm) >>>>>> for OP_STORE4. Commenting out MASK_REG under that case seems to make >>>>>> UrbanTerror 4.2 load up. I haven't actually tried a real game though. >>>>> >>>>> This is probably indicative of a bug in Urban Terror. We have hacks in >>>>> sound backends to work around UrT's misuse of the API, but in that case >>>>> it's not harmful. Removing a range check would mean compromising >>>>> security for the sake of UrT. Hmmm. >>>> >>>> Well, given the issue I think that the VM should be fixed rather >>>> than changing ioq3. I build standalone binaries for UT, where I can >>>> remove the alignment enforcement without affecting the general ioq3 >>>> packages. >>>> >>>> I wonder how much overhead would be produced by reporting unaligned >>>> data access (OP_LOAD* and OP_STORE*) instead of just force-aligning >>>> stuff. >>> >>> If the analysis by Harley is correct issue is not about alignment. If >>> removing the mask fixes the issue then UrT tries to write outside it's >>> allocated memory area. That leads to unpredictable behavior or >>> crashes in any case. >> >> You can leave the mask in place and just remove the &~3 from the mask >> that enforces alignment. >> >>> The issue should be reproducible with the interpreter in idq3 as >>> well as that one always had the masking in OP_STORE4 AFAICS. >> >> Nope, it really is the alignment. Someone on the UT side with access >> to the qvm confirmed it and started working on it. > > Original Q3 code: > https://github.com/id-Software/Quake-III-Arena/blob/master/code/qcommon/vm_interpreted.c#L449 > > So try running with +set vm_game 1 +set vm_cgame 1 +set vm_ui 1. That > should show the same issue. Unless the bug is elsewhere and the > OP_STORE4 is just a symptom...
I thought this is the code that would be run by vanilla q3 on i386: https://github.com/id-Software/Quake-III-Arena/blob/master/code/qcommon/vm_x86.c#L675 Note that the mask/alignment code is commented out. >> But someone else >> muscled in and locked the thread because: >>> UrbanTerror is a mod of Q3 and as such it does not have to be >>> compatible with any other version of the Q3 engine like ioQ3. > > That's a sad attitude :-( Didn't they use a fork of ioq3 to make it look > like a standalone game? Yes, they're making an ioq3 based standalone. However their code base is pre-1.36. On account of all the missing fixes and improvements (OPUS, OpenGL2, just to name recent ones) and the need to fiddle all my FreeBSD patches in, I just use original ioq3 to build the UT standalone for FreeBSD. -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
signature.asc
Description: OpenPGP digital signature
_______________________________________________ ioquake3 mailing list ioquake3@lists.ioquake.org http://lists.ioquake.org/listinfo.cgi/ioquake3-ioquake.org By sending this message I agree to love ioquake3 and libsdl.