Commit graph

43 commits

Author SHA1 Message Date
Thilo Schulz
9dc32d55e2 Bug 4812 - GCC __attribute__ annotations for printf, non-returning functions etc., patch by linux@youmustbejoking.demon.co.uk and Zack Middleton 2011-07-18 14:56:57 +00:00
Thilo Schulz
2f502aceb2 - Fix opStack size for vm_x86.c
- Change opStack alignment to 16 for vm_x86_64.c
2011-06-27 20:22:32 +00:00
Thilo Schulz
83522282f1 Various fixes to vm_interpreted.c:
- Add opStack protection
- Fix dataMask check for OP_BLOCK_COPY
- Add instruction number check for conditional jumps
- Make errors in VM_PrepareInterpreter nonfatal
2011-06-16 01:11:45 +00:00
Thilo Schulz
c174143dc2 - Add x86_64 support to vm_x86.c
- Fix warning on mingw64
2011-06-01 15:17:18 +00:00
Thilo Schulz
eedccac818 Fix compilation on mingw64 2011-05-31 20:47:18 +00:00
Thilo Schulz
e08299faf4 - Do assignment of value 0xDEADBEEF after the 4-byte alignment
- Add all GPR to clobber list as GCC function callAsmCall seems to change register r11 without saving it to stack first, which may result in SIGSEGV in VM_CallCompiled()
2011-05-23 00:36:27 +00:00
Thilo Schulz
61d6e6eb68 Use scaled indexing mode n=4 for addressing opStack, this way we can use the 8 bit offset value in %%bl to address an OPSTACK_SIZE of 1024 which was the old value. 2011-05-18 00:17:02 +00:00
Thilo Schulz
c7a68bf283 - Set default opStack size to 256
- Fix integer wraparound. opStack offset in rbx will always be >= 0
2011-05-16 18:17:01 +00:00
Thilo Schulz
5aa3da2f84 - Fix SEGV in while loop getop() after t = b = 0
- Fix iss8, iss16 and iss32 which would not correctly detect 32-bit signed integer range
- Add support for "addb", "subb" etc. assembler mnemonic
- Change opStack protection for x86_64 VM: No overflow checks necessary anymore as offset register is 1 byte long only
2011-05-16 17:55:07 +00:00
Thilo Schulz
30059eb8ce ensure that ent->classname is always non-null (for entity numbers up to level.num_entities-1, and ENTITYNUM_WORLD and ENTITYNUM_NONE), for player entities and #ENTITYNUM_NONE in particular, patch by DevHC 2011-05-14 14:34:18 +00:00
Thilo Schulz
9706e6ca29 whoops, that one was not Com_Error() 2011-05-10 10:18:07 +00:00
Thilo Schulz
d0a095396e - Remove newlines in Com_Error()
- Update register description
2011-05-10 10:07:34 +00:00
Thilo Schulz
a7ea395bd0 Add opStack protection to defend against malicious QVMs 2011-05-10 09:14:49 +00:00
Thilo Schulz
e05c9ad1c2 - Make some string functions in g_cmds.c cleaner, by DevHC
- embed VM_FREEBUFFERS() macro in do-while-loop
2011-02-10 18:56:18 +00:00
Thilo Schulz
544a1c0c1a - Use MAP_FAILED error code for check whether mmap() was successful
- Replace various malloc() with Z_Malloc
- Fix several memory leaks when VM compilation failed and Com_Error is called
- Make failed mmap/VirtualAlloc/malloc calls fatal
2011-02-10 18:45:28 +00:00
Ludwig Nussel
233fcb0caa fix stack alignment dynamically for OP_BLOCK_COPY 2010-06-02 14:46:16 +00:00
Ludwig Nussel
2950bb98ea fix OP_BLOCK_COPY alignment for win64 (patch by Marcus Meissner) 2010-05-17 08:59:53 +00:00
Ludwig Nussel
760f4a1949 64bit Windows support (patch by Michael Menegakis) 2010-02-28 09:00:02 +00:00
Ludwig Nussel
3d7d2d9f5b check all jumps (#4249) 2009-11-01 19:58:27 +00:00
Ludwig Nussel
da31866f6d report memory violations in debug mode 2009-11-01 19:58:21 +00:00
Ludwig Nussel
4722d311fd better range checks 2009-11-01 19:58:18 +00:00
Ludwig Nussel
ed98f65d10 optimize const before jump 2009-11-01 19:58:12 +00:00
Ludwig Nussel
a7dee44def check const jump argument 2009-11-01 19:58:09 +00:00
Ludwig Nussel
2fecf6d6bc get rid of gas remains 2009-10-26 21:59:03 +00:00
Ryan C. Gordon
31ce89361d Fixed amd64 JIT output bug.
Partially fixes Bugzilla #4271.
2009-09-15 06:30:00 +00:00
Tim Angus
9a5d971705 * Fix memory leak in win32 VM code (arQon/dmitry) 2008-08-06 16:09:29 +00:00
Thilo Schulz
5728fc2ec8 vsnprintf -> Q_vsnprintf 2008-03-25 16:44:01 +00:00
Ludwig Nussel
7a5243a3b2 use vm->callLevel to count recursive calls to VM_Call
Throw an error if vm->callLevel is set and VM_Free is called.
2008-03-24 21:20:55 +00:00
Tim Angus
672cfbf16f * Merge unified-sdl to trunk
* Bump Q3_VERSION to 1.35
2007-09-05 18:17:46 +00:00
Ludwig Nussel
fbe65853e4 new x86_64 vm that doesn't use gas 2007-08-16 11:02:21 +00:00
Ludwig Nussel
20e71c7dff - fix OP_MODU and OP_MODI
- fix minor typos
2007-07-03 13:01:36 +00:00
Ludwig Nussel
8cb20658aa another attempt to fix the alignment, this time hopfully for real 2007-07-03 12:53:00 +00:00
Ludwig Nussel
beaf352463 fix stack alignment 2007-07-03 08:16:21 +00:00
Ludwig Nussel
da2f4341c2 use native stack for vm stack as well, frees one register 2007-06-25 10:01:40 +00:00
Thilo Schulz
5dc3b35b49 - Fix loads of format string bugs
- Fix locally looping sounds, thanks to Timbo
2007-01-24 21:23:21 +00:00
Ludwig Nussel
39f2e449b6 use mmap to allocate memory for generated code to be able to set PROT_EXEC 2006-03-04 11:14:44 +00:00
Ludwig Nussel
13039ef44f make memory for generated opcodes executable so the program works with
enabled NX feature.
2006-01-06 19:11:05 +00:00
Ludwig Nussel
79ceef93cc store temporary files in /tmp to save space in ~ 2005-11-13 18:33:28 +00:00
Ludwig Nussel
590988222f - crash solved 2005-11-06 16:32:42 +00:00
Ludwig Nussel
48ee88ad77 - move code for standalone compilation out of vm_x86_64.c
- reset vm->compiled if something goes wrong in VM_Compile
2005-11-06 13:50:28 +00:00
Ludwig Nussel
58512aff09 use memcpy for OP_BLOCK_COPY 2005-10-29 17:42:12 +00:00
Tim Angus
05e8ab9538 * Added STATUS
* Updated TODO
* Moved ChangeLog to root
* Updated ChangeLog
* s/Foobar/Quake III Arena Source Code/
* Biggest patch EVAR. I wonder how many mail boxes this will fill...
2005-10-29 01:53:09 +00:00
Ludwig Nussel
0bf8e3a8b0 add x86_64 vm. experimental, not enabled by default. you need as for it
to work.
2005-10-27 21:13:47 +00:00