seg fault on fclose ();
I tried everything! Can somebody help me with this?
Code:
bash-2.05b$ uname -a Code:
void load_jump_table() { Code:
Program received signal SIGSEGV, Segmentation fault. |
Assuming there's no "free jt_file" somewhere in the <SNIP>ed parts (or in functions called there), it sounds like a bug.
|
even if there were fclose (jt_file); lines in the <SNIP>'s (there's not), wouldn't this line not try to free it again?
if (jt_file) fclose(jt_file); /* this friggin' line */ from my understanding fclose resets the file handle to NULL after it closes it. anyways, i just left the line commented and continued as normal ..... it was stupid program anyways ... computer-generated poetry :). Here's some output: Code:
bash-2.05b$ cpoetry.exe |
Not much help I know
This is probably irrelevant but the jt_file was never opened for writing, only reading, in contradiction to your error message.
Something more helpful, perhaps if you are reading past the EOF you subsequently cause segfault in fclose. |
Quote:
Quote:
Quote:
Quote:
|
All times are GMT -5. The time now is 11:09 AM. |