Crash in multisync.c:218, pickADroid() #2029
Comments
Fastdeath uploaded file |
Fastdeath commented Forgot details: |
Fastdeath commented Happened again with 3 Players on the same map. |
cybersphinx commented The crash is caused by player being 4294967285 (and using that to index an array of size 8), a value that it can't get if I didn't misread the code... |
Zarel commented Fastdeath says cybersphinx thinks it might be compiler bug. I'm not sure, but I think it might be a new-in-2.3.2 bug. Both people were playing on Linux, so that might have something to do with it, too. My theory is that it's caused by an array overflow overwriting the contents of the player variable. Review all our 2.3.2 commits that could have caused an overflow? |
cybersphinx commented It might happen in 2.3.2 not because we changed some array to overflow or something, but because the code layout changed, and what it overwrote in 2.3.1 was irrelevant (or lead to different problems bugs). The problem with those kind of bugs is that we really need a way to reproduce them to fix them (or you need to run in gdb all the time, with a watch on player that triggers when it goes above 7, and then get a full backtrace). |
Fastdeath commented This is maybe a compiler bug 2.3.2 works "currently" fine with gcc-4.4.1 |
Zarel commented Replying to Warzone2100/old-trac-import#2029 (comment:7):
I seriously doubt it's a compiler bug. Like cybersphinx says, far more likely that a compiler change caused one of our other bugs to modify Fortunately, this makes it a lot easier to fix, too. Set a watchpoint on |
cybersphinx commented Run "gdb src/warzone2100", then enter
That will trigger a full backtrace if player goes outside its valid range, and continue otherwise. The indentation is just for clarity, and height 0 prevents "press enter to continue" messages after one screen page of output. |
cybersphinx commented Oh, you probably need to use "pickADroid::player" instead of just "player" in the conditions, since when this bug triggers, it won't be in scope. |
cybersphinx commented Zarel: If you have more info about this problem, would you mind adding it here? |
Zarel commented I have no info except a question about why, for a bug already reported like four times, we still haven't gotten a trace of a watchpoint hit of |
cybersphinx commented Maybe because we need one of the binaries that actually crash? I've asked Edek22 to attach his here, and I think I've asked Fastdeath as well. If not, he shall now consider himself asked. |
Zarel commented Well, yeah, I'm not blaming you or the staff, I'm just wondering why none of the people experiencing this bug have actually done the trace. |
Fastdeath commented My crashing binary: |
Fastdeath uploaded file Watchpoint on pickadroid::player with crash |
Fastdeath uploaded file |
Safety0ff changed priority from |
cybersphinx uploaded file Proposed patch. |
cybersphinx uploaded file Same without whitespace changes, since the real changes are not much. |
the_cybersphinx changed status from |
the_cybersphinx set resolution to |
the_cybersphinx commented (In [11322]) Prevent out of bounds access of player stat arrays. In the 2.3 netcode, we use player 9 for features, while we only have stats for |
the_cybersphinx commented (In [11323]) Prevent out of bounds access of player stat arrays. In the 2.3 netcode, we use player 9 for features, while we only have stats for |
the_cybersphinx commented (In [11324]) Prevent out of bounds access of player stat arrays. In the 2.3 netcode, we use player 9 for features, while we only have stats for |
Git SVN Gateway <gateway@...> commented (In Warzone2100/warzone2100@324722f) Prevent out of bounds access of player stat arrays. In the 2.3 netcode, we use player 9 for features, while we only have stats for git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11323 4a71c877-e1ca-e34f-864e-861f7616d084 |
Git SVN Gateway <gateway@...> commented In Warzone2100/warzone2100@324722f:
|
1 similar comment
Git SVN Gateway <gateway@...> commented In Warzone2100/warzone2100@324722f:
|
resolution_fixed
type_bug
| by FastdeathWas 8 Player Multiplayer game on
SK-Wintersquared-T1
With 3 Players and 5 AI's
Issue migrated from trac:2029 at 2022-04-15 22:10:00 -0700
The text was updated successfully, but these errors were encountered: