Bug#522529: micropolis: Segfault when loading scenarios

Christoph Egger debian at christoph-egger.org
Wed Jun 24 20:53:49 UTC 2009

tag 522529 +patch

Ying-Chun Liu (PaulLiu) schrieb:
> 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.


Thank you for your patch, it fixes the crash here as well.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20090624/df5a19ef/attachment.pgp>

More information about the Pkg-games-devel mailing list