View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0002940 | Spring engine | General | public | 2012-02-03 19:35 | 2012-11-11 23:06 | ||||
Reporter | abma | ||||||||
Assigned To | abma | ||||||||
Priority | normal | Severity | crash | Reproducibility | always | ||||
Status | closed | Resolution | unable to reproduce | ||||||
Product Version | 85.0 | ||||||||
Target Version | 86.0 | Fixed in Version | |||||||
Summary | 0002940: valgrind errors: Invalid read of size 8 (zero-k) (found because game desynced) | ||||||||
Description | first valgrind errors happens at frame 0: (at warmup) http://pastebin.com/ub2yNTD8 | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|||||||||||||||||||||
|
![]() |
|
abma (administrator) 2012-02-03 19:37 |
demo: http://zero-k.info/Battles/Detail/51982 first valgrind error happens early in the game. |
abma (administrator) 2012-02-03 19:52 Last edited: 2012-02-03 19:52 |
here the invalid read is made: https://github.com/spring/spring/blob/master/rts/Sim/Projectiles/ExplosionGenerator.cpp#L624 |
abma (administrator) 2012-02-03 20:00 |
i guess it can be reproduced by running "Zero-K v0.9.9.2" + valgrind. |
abma (administrator) 2012-02-03 20:14 |
see valgrind.log for more verbose output. (was created with --track-origins=yes, pastebin is without this valgrind switch) |
Kloot (developer) 2012-02-03 20:50 Last edited: 2012-02-03 21:05 |
hmm, I suppose the problem might be that std::strings are not (always) NULL-terminated (while strtod&co expect C-style strings) |
abma (administrator) 2012-02-04 10:14 Last edited: 2012-02-04 10:15 |
add an assertion: assert(script[script.size()]==0); or assert(p<script.size()); ? |
Kloot (developer) 2012-02-04 12:08 |
assert(script[script.size()]==0); --> undefined if the std::string implementation does not carry a terminator assert(p<script.size()); --> look at line 621, the problem is inside strtod itself |
abma (administrator) 2012-02-04 14:14 |
relevant valgrind output of 85.0.1-170-g0acab62: http://pastebin.com/L24bfFeD |
abma (administrator) 2012-02-04 14:17 Last edited: 2012-02-04 14:20 |
hmm, related http://sourceware.org/bugzilla/show_bug.cgi?id=12424 ? or this one? https://lists.launchpad.net/tarantool-developers/msg01024.html (valgrind bug) |
Kloot (developer) 2012-02-04 15:12 |
Ok, _assuming_ this is just a false positive (and valgrind does not know enough about the optimized strncasecmp used by strtod), it should not be the cause of the desync and can be ignored/surpressed. Would need logging of the returned strtod values to be sure though. |
abma (administrator) 2012-11-11 23:06 |
new valgrind run needed... (imo this one is to old, maybe its already fixed) |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2012-02-03 19:35 | abma | New Issue | |
2012-02-03 19:35 | abma | Product Version | => 85.0 |
2012-02-03 19:35 | abma | Target Version | => 86.0 |
2012-02-03 19:35 | abma | Summary | valgrind errors: Invalid read of size 8 => valgrind errors: Invalid read of size 8 (zero-k) |
2012-02-03 19:37 | abma | Note Added: 0008249 | |
2012-02-03 19:38 | abma | Description Updated | |
2012-02-03 19:41 | abma | Relationship added | related to 0002743 |
2012-02-03 19:43 | abma | Relationship added | related to 0002889 |
2012-02-03 19:52 | abma | Note Added: 0008251 | |
2012-02-03 19:52 | abma | Note Edited: 0008251 | |
2012-02-03 20:00 | abma | Note Added: 0008252 | |
2012-02-03 20:13 | abma | File Added: valgrind.log | |
2012-02-03 20:14 | abma | Note Added: 0008254 | |
2012-02-03 20:33 | abma | File Deleted: valgrind.log | |
2012-02-03 20:33 | abma | File Added: valgrind.log | |
2012-02-03 20:43 | abma | Relationship added | parent of 0002942 |
2012-02-03 20:46 | abma | Relationship added | parent of 0002943 |
2012-02-03 20:50 | Kloot | Note Added: 0008256 | |
2012-02-03 20:53 | Kloot | Note Edited: 0008256 | |
2012-02-03 21:05 | Kloot | Note Edited: 0008256 | |
2012-02-04 00:38 | abma | Summary | valgrind errors: Invalid read of size 8 (zero-k) => valgrind errors: Invalid read of size 8 (zero-k) (found because game desynced) |
2012-02-04 10:14 | abma | Note Added: 0008258 | |
2012-02-04 10:15 | abma | Note Edited: 0008258 | |
2012-02-04 12:08 | Kloot | Note Added: 0008259 | |
2012-02-04 14:14 | abma | Note Added: 0008260 | |
2012-02-04 14:17 | abma | Note Added: 0008261 | |
2012-02-04 14:20 | abma | Note Edited: 0008261 | |
2012-02-04 15:12 | Kloot | Note Added: 0008262 | |
2012-11-11 23:06 | abma | Note Added: 0009349 | |
2012-11-11 23:06 | abma | Status | new => closed |
2012-11-11 23:06 | abma | Assigned To | => abma |
2012-11-11 23:06 | abma | Resolution | open => unable to reproduce |