ports/142886: [maintainer-update] games/ioquake3 (backport VM patch)
Dominic Fandrey
kamikaze at bsdforen.de
Sat Jan 16 17:30:01 UTC 2010
>Number: 142886
>Category: ports
>Synopsis: [maintainer-update] games/ioquake3 (backport VM patch)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sat Jan 16 17:30:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Dominic Fandrey
>Release: RELENG_8
>Organization:
private
>Environment:
FreeBSD mobileKamikaze.norad 8.0-STABLE FreeBSD 8.0-STABLE #0: Tue Jan 5 16:34:32 CET 2010 root at mobileKamikaze.norad:/usr/obj/HP6510b-8/amd64/usr/src/sys/HP6510b-8 amd64
>Description:
The ioq3 1.36 release contains a 64bit bug in its VM code, which causes it to crash on all non-GNU platforms (unless playing with native libraries, which is not recommended):
http://lists.ioquake.org/htdig.cgi/ioquake3-ioquake.org/2010-January/003760.html
This update backports the patch from SVN r1772.
I'm sorry for updating so frequently, but I consider this a pretty fatal bug.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff -Nur ports/games/ioquake3.orig/Makefile ports/games/ioquake3/Makefile
--- ports/games/ioquake3.orig/Makefile 2010-01-16 13:43:31.000000000 +0100
+++ ports/games/ioquake3/Makefile 2010-01-16 13:49:38.000000000 +0100
@@ -7,7 +7,7 @@
PORTNAME?= ioquake3
DISTVERSION?= 1.36
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES= games
MASTER_SITES?= http://ioquake3.org/files/${DISTVERSION}/
diff -Nur ports/games/ioquake3.orig/files/patch-code-qcommon-vm_interpreted.c ports/games/ioquake3/files/patch-code-qcommon-vm_interpreted.c
--- ports/games/ioquake3.orig/files/patch-code-qcommon-vm_interpreted.c 1970-01-01 01:00:00.000000000 +0100
+++ ports/games/ioquake3/files/patch-code-qcommon-vm_interpreted.c 2010-01-16 15:55:45.000000000 +0100
@@ -0,0 +1,34 @@
+--- code/qcommon/vm_interpreted.c 2009/11/01 19:58:07 1717
++++ code/qcommon/vm_interpreted.c 2010/01/16 10:55:51 1772
+@@ -516,18 +516,20 @@
+
+ //VM_LogSyscalls( (int *)&image[ programStack + 4 ] );
+ {
+- intptr_t* argptr = (intptr_t *)&image[ programStack + 4 ];
+- #if __WORDSIZE == 64
+- // the vm has ints on the stack, we expect
+- // longs so we have to convert it
+- intptr_t argarr[16];
+- int i;
+- for (i = 0; i < 16; ++i) {
+- argarr[i] = *(int*)&image[ programStack + 4 + 4*i ];
++ // the vm has ints on the stack, we expect
++ // pointers so we might have to convert it
++ if (sizeof(intptr_t) != sizeof(int)) {
++ intptr_t argarr[16];
++ int *imagePtr = (int *)&image[programStack];
++ int i;
++ for (i = 0; i < 16; ++i) {
++ argarr[i] = *(++imagePtr);
++ }
++ r = vm->systemCall( argarr );
++ } else {
++ intptr_t* argptr = (intptr_t *)&image[ programStack + 4 ];
++ r = vm->systemCall( argptr );
+ }
+- argptr = argarr;
+- #endif
+- r = vm->systemCall( argptr );
+ }
+
+ #ifdef DEBUG_VM
diff -Nur ports/games/ioquake3.orig/pkg-message ports/games/ioquake3/pkg-message
--- ports/games/ioquake3.orig/pkg-message 2010-01-16 13:43:31.000000000 +0100
+++ ports/games/ioquake3/pkg-message 2010-01-16 17:58:54.000000000 +0100
@@ -1,14 +1,11 @@
==============================================================================
-The input devices are now handled by SDL. Some mouse buttons will have
-different aliases and the mouse speed needs to be readjusted.
+Should the game freeze when entering a match, try to change the value of
+com_zoneMegs (e.g. to 48).
The configuration files are saved to ~/.ioquake3 instead of ~/.q3a because
they have additional variables which would be removed if other engines
overwrite them. But you can safely copy the original directory to the new one
for the first time.
-Should you encounter freezes when playing a demo or single player game,
-rebuild without client libraries.
-
==============================================================================
diff -Nur ports/games/ioquake3-devel.orig/Makefile ports/games/ioquake3-devel/Makefile
--- ports/games/ioquake3-devel.orig/Makefile 2010-01-16 13:43:22.000000000 +0100
+++ ports/games/ioquake3-devel/Makefile 2010-01-16 13:49:19.000000000 +0100
@@ -17,7 +17,7 @@
PLIST= ${.CURDIR}/../ioquake3/pkg-plist
PATCHDIR= ${WRKDIR}/freebsd-patchset/
-SVNREVISION= 1771
+SVNREVISION= 1772
BINSUFFIX= -devel
.include "${.CURDIR}/../ioquake3/Makefile"
diff -Nur ports/games/ioquake3-devel.orig/distinfo ports/games/ioquake3-devel/distinfo
--- ports/games/ioquake3-devel.orig/distinfo 2010-01-16 13:43:22.000000000 +0100
+++ ports/games/ioquake3-devel/distinfo 2010-01-16 13:49:27.000000000 +0100
@@ -1,3 +1,3 @@
-MD5 (ioquake3-devel-1.36_SVN1771.zip) = 651a912a4cebb68f33a9f7fc63a3ec0e
-SHA256 (ioquake3-devel-1.36_SVN1771.zip) = 75aecab911f880e19d319c9e508fc4495b1d53e22207fae26d0a1b436817b4d9
-SIZE (ioquake3-devel-1.36_SVN1771.zip) = 4927089
+MD5 (ioquake3-devel-1.36_SVN1772.zip) = 6d5e4b9899eeb5541da8585d978f438f
+SHA256 (ioquake3-devel-1.36_SVN1772.zip) = 756eb79863f415703b6e3407db22104dc514f904586b5a09d72788f5745c1daa
+SIZE (ioquake3-devel-1.36_SVN1772.zip) = 4927099
diff -Nur ports/games/ioquake3-devel.orig/pkg-message ports/games/ioquake3-devel/pkg-message
--- ports/games/ioquake3-devel.orig/pkg-message 2010-01-16 13:43:22.000000000 +0100
+++ ports/games/ioquake3-devel/pkg-message 2010-01-16 18:00:50.000000000 +0100
@@ -1,6 +1,6 @@
==============================================================================
-Should you encounter freezes when playing a demo or single player game,
-rebuild without client libraries.
+Should the game freeze when entering a match, try to change the value of
+com_zoneMegs (e.g. to 48).
==============================================================================
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list