View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000830 | LDMud | Portability | public | 2014-02-22 22:09 | 2021-04-16 19:41 |
| Reporter | Leonidas | Assigned To | |||
| Priority | normal | Severity | crash | Reproducibility | random |
| Status | closed | Resolution | unable to reproduce | ||
| Platform | CYGWIN_NT-6.1 | OS | Cygwin | OS Version | 1.7.28(0.271/5/3 |
| Summary | 0000830: Cyg64 Driver crashes unexpectedly/suddenly in flush_all_player_mess(). | ||||
| Description | Crashing function is comm::flush_all_player_mess(). > Program received signal SIGSEGV, Segmentation fault. > 0x0000000100423070 in flush_all_player_mess () at comm.c:2158 > 2158 nip = ip->next_player_for_flush; > (gdb) bp > Undefined command: "bp". Try "help". > (gdb) list > 2153 interactive_t *ip, *nip; > 2154 object_t *save = command_giver; > 2155 > 2156 for ( ip = first_player_for_flush; ip != NULL; ip = nip) > 2157 { > 2158 nip = ip->next_player_for_flush; > 2159 /* add_message() will clobber (ip)->next_player_for_flush! */ > 2160 command_giver = ip->ob; > 2161 add_message(message_flush); > 2162 > (gdb) bt > #0 0x0000000100423070 in flush_all_player_mess () at comm.c:2158 > 0000001 0x0000000100423144 in get_message (buff=0x224900 "elementarsphaere feuer") > at comm.c:2278 > 0000002 0x000000010040e0df in backend () at backend.c:745 > 0000003 0x000000010047e7d1 in main (argc=14, argv=0x22aa40) at main.c:681 > (gdb) print ip > $1 = (interactive_t *) 0x0 > (gdb) print nip > $2 = (interactive_t *) 0x0 > (gdb) print first_player_for_flush > $3 = (interactive_t *) 0x0 > (gdb) print command_giver > $4 = (object_t *) 0x0 > (gdb) print save > $5 = (object_t *) 0x0 > (gdb) next > 0x0000000077bd9c42 in ntdll!RtlLookupFunctionEntry () > from /cygdrive/c/Windows/system32/ntdll.dll > (gdb) > Program received signal SIGSEGV, Segmentation fault. > 0x0000000100423070 in flush_all_player_mess () at comm.c:2158 > 2158 nip = ip->next_player_for_flush; > (gdb) bp > Undefined command: "bp". Try "help". > (gdb) list > 2153 interactive_t *ip, *nip; > 2154 object_t *save = command_giver; > 2155 > 2156 for ( ip = first_player_for_flush; ip != NULL; ip = nip) > 2157 { > 2158 nip = ip->next_player_for_flush; > 2159 /* add_message() will clobber (ip)->next_player_for_flush! */ > 2160 command_giver = ip->ob; > 2161 add_message(message_flush); > 2162 > (gdb) bt > #0 0x0000000100423070 in flush_all_player_mess () at comm.c:2158 > 0000001 0x0000000100423144 in get_message (buff=0x224900 "elementarsphaere feuer") > at comm.c:2278 > 0000002 0x000000010040e0df in backend () at backend.c:745 : > 0000003 0x000000010047e7d1 in main (argc=14, argv=0x22aa40) at main.c:681 > (gdb) print ip > $1 = (interactive_t *) 0x0 > (gdb) print nip > $2 = (interactive_t *) 0x0 > (gdb) print first_player_for_flush > $3 = (interactive_t *) 0x0 > (gdb) print command_giver > $4 = (object_t *) 0x0 > (gdb) print save > $5 = (object_t *) 0x0 > (gdb) next > 0x0000000077bd9c42 in ntdll!RtlLookupFunctionEntry () > from /cygdrive/c/Windows/system32/ntdll.dll > (gdb) > Program received signal SIGSEGV, Segmentation fault. > 0x0000000100423070 in flush_all_player_mess () at comm.c:2158 > 2158 nip = ip->next_player_for_flush; > (gdb) bt > #0 0x0000000100423070 in flush_all_player_mess () at comm.c:2158 > 0000001 0x0000000100423144 in get_message (buff=0x224900 "ls") at comm.c:2278 > 0000002 0x000000010040e0df in backend () at backend.c:745 > 0000003 0x000000010047e7d1 in main (argc=14, argv=0x22aa40) at main.c:681 > (gdb) list > 2153 interactive_t *ip, *nip; > 2154 object_t *save = command_giver; > 2155 > 2156 for ( ip = first_player_for_flush; ip != NULL; ip = nip) > 2157 { > 2158 nip = ip->next_player_for_flush; > 2159 /* add_message() will clobber (ip)->next_player_for_flush! */ > 2160 command_giver = ip->ob; > 2161 add_message(message_flush); > 2162 > (gdb) print ip > $6 = (interactive_t *) 0x0 > (gdb) print nip > $7 = (interactive_t *) 0x0 > (gdb) bt > #0 0x0000000100423070 in flush_all_player_mess () at comm.c:2158 > 0000001 0x0000000100423144 in get_message (buff=0x224900 "ls") at comm.c:2278 > 0000002 0x000000010040e0df in backend () at backend.c:745 > 0000003 0x000000010047e7d1 in main (argc=14, argv=0x22aa40) at main.c:681 > (gdb) up > 0000001 0x0000000100423144 in get_message (buff=0x224900 "ls") at comm.c:2278 > 2278 flush_all_player_mess(); > (gdb) list > 2273 int nfds; /* number of fds for select() */ > 2274 int res; /* result from select() */ > 2275 int twait; /* wait time in seconds for select() */ > 2276 int retries; /* retries of select() after EINTR */ > 2277 > 2278 flush_all_player_mess(); > 2279 twait = comm_time_to_call_heart_beat ? 0 : 1; > 2280 /* If the heart_beat is due, just check the state > 2281 * of the sockets, but don't wait. > 2282 */ > (gdb) print command_giver > $8 = (object_t *) 0x0 > (gdb) print NextCmdGiver > $9 = -1 > (gdb) print first_player_for_flush > $10 = (interactive_t *) 0x0 > (gdb) print all_players > $11 = {0x6fff1252598, 0x6fff1348ad0, 0x0 <repeats 223 times>} > (gdb) | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| External Data (URL) | |||||
|
|
I don't think we can do anything here. The crash occurs on the first line of a loop with the loop condition "ip != NULL", but ip is NULL. So the compiler does something very wrong here. In the code there is no indication that first_player_for_flush can never be NULL, indeed it is initialized with NULL. The compiler has no grounds to believe, that ip is never NULL. |
|
|
As we can't reproduce it and the ticket is admittedly very old, I'm closing this. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2014-02-22 22:09 | Leonidas | New Issue | |
| 2014-02-22 22:09 | Leonidas | File Added: config.h | |
| 2014-02-22 22:09 | Leonidas | File Added: machine.h | |
| 2014-02-22 22:14 | zesstra | Issue cloned: 0000831 | |
| 2014-02-22 22:20 | zesstra | Priority | none => normal |
| 2014-02-22 22:20 | zesstra | Severity | major => crash |
| 2014-02-22 22:20 | zesstra | Summary | Cyg64 Driver crashes unexpectedly/suddenly => Cyg64 Driver crashes unexpectedly/suddenly in flush_all_player_mess(). |
| 2014-02-22 22:20 | zesstra | Description Updated | |
| 2021-04-16 15:04 | Gnomi | Note Added: 0002589 | |
| 2021-04-16 19:41 | Gnomi | Status | new => closed |
| 2021-04-16 19:41 | Gnomi | Resolution | open => unable to reproduce |
| 2021-04-16 19:41 | Gnomi | Note Added: 0002600 |