Greetings,
This is the gdb of my crash:
Code:
Reading symbols from bin/circle...
[New LWP 211177]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `circle -C3 9000'.
Program terminated with signal SIGSEGV, Segmentation fault.
Download failed: Invalid argument.  Continuing without source file ./malloc/./malloc/malloc.c.
#0  0x00007c0e884add55 in __GI___libc_free (mem=0x18fffb02f50003)
    at ./malloc/malloc.c:3375
warning: 3375   ./malloc/malloc.c: No such file or directory
(gdb) bt
#0  0x00007c0e884add55 in __GI___libc_free (mem=0x18fffb02f50003)
    at ./malloc/malloc.c:3375
#1  0x0000601067bbe2ae in close_socket (d=d@entry=0x601080aa18a0)
    at comm.c:2368
#2  0x0000601067bbfdef in game_loop (local_mother_desc=3) at comm.c:983
#3  0x0000601067b5d282 in init_game (local_port=<optimized out>) at comm.c:567
#4  main (argc=<optimized out>, argv=<optimized out>) at comm.c:364
(gdb) q
 
Line #2368 of comm.c is here:
Code:
  /* Clear the command history. */
  if (d->history)
  {
    int cnt;
    for (cnt = 0; cnt < HISTORY_SIZE; cnt++)
      if (d->history[cnt])
        free(d->history[cnt]);  // this is #2368
    free(d->history);
  }
 
Are we having problems calling free() without malloc as comm.c doesn't include stdlib.h ?
 
Thanks!