Menu

#5 GCC 4.1.2 "continue game" segfault fix

open
nobody
None
5
2006-11-19
2006-11-19
Anonymous
No

The CVS version and the downloadable linux source both have a bug when you try to continue a saved game. The fix is simple:

RCS file: /cvsroot/ivan/ivan/Main/Include/proto.h,v
retrieving revision 1.68
diff -r1.68 proto.h
114,115c114,115
< int Type = 0;
< SaveFile >> (ushort&)Type;
---
> ushort Type = 0;
> SaveFile >> Type;

Newer versions of GCC compile with -fstrict-aliasing, which causes the code above to be optimized improperly. My guess is that this problem may pop up other places too, so it might just be simpler to compile with -fno-strict-aliasing.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.