Commit Graph

61 Commits

Author SHA1 Message Date
Zack Middleton c5af65fe5f Fix passing arg9 (qvm only), arg10, and arg11 to vmMain for native libs and non-i386 compiled or interpated qvms. (Currently they aren't use in vmMain in game, cgame, or ui.)
Fix passing args[11] to args[15] from vm to engine on ppc64 and sparc64. Some of the args are used by game bot prediction syscalls. May have been causing bugs. Note: This was fixed for x86_64 in r2163.
2012-12-15 21:55:07 +00:00
Zack Middleton 4cfbbe506c when interacting with QVMs, Clang/LLVM requires the standard use of the va_*() macros instead of (fast) call hacks
From /dev/humancontroller.
2012-06-19 14:57:51 +00:00
Zack Middleton 9064a13409 Fixed showing number of qvm jump table targets (r2180 caused it to show 0 on alloc). 2011-10-28 19:43:43 +00:00
Thilo Schulz 89d986a35b Fix a few string literals 2011-09-28 03:13:30 +00:00
Thilo Schulz 7eba074ce4 Allow VM_Restart to load unpure qagame.qvm so that local server won't crash after map_restart if server operator has qagame.qvm residing outside pak file (#5196)
Thanks to "rg3" for providing a shell account
2011-09-27 22:16:07 +00:00
Thilo Schulz d176ebe84a Add some checks when reloading QVMs via VM_Restart() 2011-09-27 21:49:01 +00:00
Thilo Schulz acc2da023c Throw error when making calls to empty VM 2011-09-27 21:17:21 +00:00
Tim Angus 85ae08e800 * Fix some grammar in DLL loading
* s/Sys_LoadQVMDll/Sys_LoadGameDll/
2011-08-03 14:32:49 +00:00
Thilo Schulz 3752b1d7c4 Change DLL search path order for external libraries that are linked at runtime, like libcurl or libopenal to:
* system library paths
  * executable path
  * fs_basepath
2011-07-29 20:18:37 +00:00
Thilo Schulz 23f6fd1633 Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings 2011-07-29 12:27:00 +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 af5020c57c - Don't try to load QVM/DLL files on pure servers
- Fallback after failed DLL load will be VMI_COMPILED, not INTERPRETED
2011-06-15 22:25:13 +00:00
Thilo Schulz 9219cde4e8 - Small change to search path order - local files not in .pk3s take precedence over files in pk3s. Should make life easier for modders/mappers wanting to override textures that are already contained in some older pk3
- Make VM loading more robust, change loading order: when vm_* == 0 first try loading DLL, then QVM in *each* search directory/path
- Fix FS_FileForHandle that would return a FILE pointer to invalid file handle 0
2011-06-15 22:09:26 +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 c95bd0a684 Remove newlines from Com_Error message format strings, patch by DevHC 2011-05-12 14:02:48 +00:00
Thilo Schulz fef4d12d68 Refactoring patch by DevHC 2011-03-05 19:20:37 +00:00
Thilo Schulz 4dc750aedb Merge "which" command upstream from Tremulous, patch provided by Chris Schwarz 2011-02-10 23:07:07 +00:00
Zachary Slater 5e0d0efd2e http://www.angryflower.com/aposter.html
(minor English issues, most of which are via /dev/humancontroller)
2011-02-09 05:51:33 +00:00
Thilo Schulz 2b52867b74 Code cleanup patch by devhc 2011-02-08 18:19:31 +00:00
Ludwig Nussel 469c986640 more security checks in interpreter (#4249) 2009-11-01 19:58:07 +00:00
Ludwig Nussel cc9a74a218 Define stack sizes at central place
also reverts bug 4282 as stack is included in bss already so nothing that needs fixing
2009-11-01 19:58:03 +00:00
Tim Angus 15ec986478 * ...and make sure it compiles 2009-09-17 20:05:56 +00:00
Tim Angus cc8990495a * (bug #4282) Fix potential overlap of VM stack and bss sections (Patrick
Baggett)
2009-09-17 09:42:05 +00:00
Ludwig Nussel 30c44b1a87 qcommon: vm: sparc, like 386, doesn't need var-args conversion.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 17:29:35 +00:00
Tim Angus 72dea0a184 * Fix some new GCC 4.3 warnings
* Fix many many strict aliasing warnings, now that it's re-enabled
2008-11-10 23:55:22 +00:00
Ludwig Nussel 43ac1eca6a set flag to allow forced unload of a running VM
required to prevent a client from exiting if the server disconnects (bug 3585)
2008-04-06 12:59:35 +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 8e82c3d605 - tag more functions with gnu format attribute
- fix format string bugs. still some left
2006-12-30 12:32:54 +00:00
Thilo Schulz d21411452e Add string length checking to function COM_StripExtension. This fixes the R_RemapShader buffer overflow exploit that can be found here:
http://milw0rm.com/exploits/1750
2006-05-06 01:56:24 +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 a99e721711 try to fix msvc build 2006-02-26 20:01:45 +00:00
Ludwig Nussel 4c242115dc - change long to intptr_t for 64bit windows compatability
- change vmMain arguments back to int. 64bit types are apparently not
  needed there. Only the syscall function needs them.
2006-02-18 19:07:23 +00:00
Ludwig Nussel 8a18ecb961 - fall back to interpreter if VM_Compile resets vm->compiled 2005-11-06 13:46:17 +00:00
Tim Angus e4b7a04d5c * Replaced a bunch of inline and __inline with ID_INLINE
* Replaced a bunch of __i386__ with id386
* General tidy up of asm preprocessor decisions
* Removed C_ONLY from the dedicated server build
2005-11-04 22:32:00 +00:00
Ludwig Nussel e3e3d8b9aa actually when calling from the vm to the engine there are more than 10
arguments
2005-11-02 21:45:48 +00:00
Ludwig Nussel 5f79f9958b pass only 10 arguments. vm_* doesn't use more anyways. 2005-11-02 20:58:27 +00:00
Ludwig Nussel 3ce5d5dccd pass only 10 arguments. vm_* doesn't use more anyways. 2005-11-02 20:56:13 +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
Tim Angus ffdc69f138 * Deleted code/unix/vm_x86.c - wtf was that about anyway?
* Removed HAVE_VM_NATIVE
* Removed DLL_ONLY
* Replace HAVE_VM_COMPILED with NO_VM_COMPILED -- this means the JIT compiler
  should be enabled on the OS X and VC builds now
* Remove the remainder of the freetype building stuff
2005-10-29 00:23:10 +00:00
Tim Angus b1b7f975f1 * Fix the x86 vm 2005-10-27 22:38:25 +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
Tim Angus 9f55ae2dce * Fixed a bug with QVM loading on big endian architectures 2005-10-26 17:09:50 +00:00
Tim Angus 535545684f * Adjusted VM_LoadQVM interface 2005-10-14 17:09:03 +00:00
Tim Angus f7c82c1adc * Fixed some annoying code duplication 2005-10-13 23:08:45 +00:00
Tim Angus 35cb35ff61 * (Non-trivial) fix to the "opStack corrupted in compiled code" bug 2005-10-13 14:47:00 +00:00
Ludwig Nussel f62601ac53 don't call VM_Compile if it's not supported so the VM_Compile symbol
isn't needed
2005-10-09 13:05:44 +00:00
Ludwig Nussel d5fbff3f44 revert int->long change as it breaks on 64bit. Actually only
VM_CallInterpreted hurts as VM_CallCompiled is only used on 32bit. Use
same arg types for consistency nevertheless.
2005-09-26 22:23:46 +00:00
Tim Angus cde9e9e93c * Fixed some long/int warnings, hopefully this doesn't disrupt the MSVC and/or 64bit builds 2005-09-26 16:13:14 +00:00
Tim Angus 2b8395a4d0 * Replaced lots of __linux__ || __FreeBSD__ with __GNUC__
* MinGW port now uses asm versions of SnapVector and ftol
* Improved the handling of mangled symbols in vm_x86.c
2005-09-23 02:59:15 +00:00