Bug#522529: micropolis: Segfault when loading scenarios

Ying-Chun Liu (PaulLiu) grandpaul at gmail.com
Wed Jun 24 18:14:25 UTC 2009


Dear all,

I think we have to fix all the warnings.

C assumes all functions not defined the type of return values as integers.
So a void function call without definition might get a stack pop by the caller which mess up the stack.
However, normally it won't be that stupid, but
it could be a compiler optimizer bug. So with -O0 or -O3, I don't get a crash.

I've made a stupid patch which solves the crash at loading scenarios compiled by -O2. It just modify
"return;" to "return 0;" around DoZone() and the function calls inside DoZone();

Please try the attachment (quilt patch, last one in series).
My arch is i386, not amd64.

Yours Sincerely,
Paul.

-- 
                                                PaulLiu(劉穎駿)
E-mail address: grandpaul at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixcrash.patch
Type: text/x-patch
Size: 4200 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20090625/72f9b6e9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 898 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20090625/72f9b6e9/attachment.pgp>


More information about the Pkg-games-devel mailing list