OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: return to castle wolfenstein port

From: Sebastian Reitenbach (sebastial00-bugdead-prods.de)
Date: Sun Aug 15 2010 - 05:33:58 CDT


Jolan Luff wrote:
> Here's a quick and dirty port of return to castle wolfenstein which
> was just open sourced a few days ago. It's i386 only right now due
> to the codebase.
>
> There's a few problems that I've noticed so far:
>
> - the game uses oss for sound but it doesn't work for some reason.
> seems to be related to either DSP_CAP_TRIGGER or DSP_CAP_MMAP.
> - performance is spotty. it's either 4 or 40 fps on an atom 1.66ghz +
> intel 945. this game was released in late 2001 and the minimum
> requirements were 400mhz cpu + 16mb vram so i'd think it should be
> quite speedy on modernish budget hardware.
> - the game crashes when you die. it's probably something silly with
> dlopen()/dlclose() but i haven't looked at it yet.
>
> Let me know if you notice anything else.
>
While compiling the port, I recognized there was sth. dumping core:

release-x86-OpenBSD-/game/game/g_combat.c:1: warning: -malign-loops is
obsolete, use -falign-loops
release-x86-OpenBSD-/game/game/g_combat.c:1: warning: -malign-jumps is
obsolete, use -falign-jumps
release-x86-OpenBSD-/game/game/g_combat.c:1: warning: -malign-functions
is obsolete, use -falign-functions
[perl] &build_funcs()
Building functions table
in /home/ports/pobj/rtcw-1.31/RTCW-SP-GPL/src/game
Abort trap (core dumped)

gdb -c game/extractfuncs.core unix/extractfuncs
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd4.8"...
Core was generated by `extractfuncs'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/lib/libc.so.56.0...done.
Loaded symbols for /usr/lib/libc.so.56.0
Reading symbols from /usr/libexec/ld.so...done.
Loaded symbols for /usr/libexec/ld.so
#0 0x02bc6f4d in kill () from /usr/lib/libc.so.56.0
(gdb) bt
#0 0x02bc6f4d in kill () from /usr/lib/libc.so.56.0
#1 0x02c293e3 in __stack_smash_handler (func=0x3c0000e0
"DumpReplaceFunctions", damaged=-809731879)
    at /usr/src/lib/libc/sys/stack_protector.c:89
#2 0x1c0014e7 in DumpReplaceFunctions ()
    at
/home/ports/pobj/rtcw-1.31/RTCW-SP-GPL/src/extractfuncs/out/src/extractfuncs/extractfuncs.c:289
#3 0x672f656d in ?? ()
#4 0x6e75665f in ?? ()
#5 0x65645f63 in ?? ()
#6 0x682e7363 in ?? ()
#7 0x1c000d00 in __register_frame_info ()
Previous frame inner to this frame (corrupt stack?)

it also doesn't seem to pick up CFLAGS and the like from mk.conf,
therefore the backtrace is probably not much useful.

Sebastian