ALL
An experience of fixing a memory-corruption bug
During the last 4 months, I was disturbed by a memory-corruption bug, and this bug will cause program crash. Until last Monday, I found the root cause and fixed it. This debug process is a difficult but memorable experience, so I will share it in this article. My program works as a SMS Hub. When it receives a SMS, it will allocate a structure in heap memory like this:typedef struct{ ...... int *a[8]; ......} info;After processing the SMS, the program will free the memory, and send the SMS to the next Hub or Operator. Since last November, the program will crash som...
9,017 0 C UNIX DEBUG SOLARIS MULTI-THREAD