Here is the problem:
The core dump showed: Program terminated with signal 11, Segmentation fault;
And pointed to line: fprintf(fp_log, "The number is %d", number);
fp was opened, and had been written with many log messages.
gdb shows:
(gdb) p fp
$3 = (FILE *) 0x20202020
What was the possible issue causing fp corrupted? Thanks.
Start Free Trial