I have a software, code of which I have modified and run make again.
If I run the modified code in a black QtCreator project it runs well (nothing specific to Qt, just an example), but if I compile with software’s original makefile, I get error on a line as:
(*F)=(double**) malloc((size_arr)*sizeof(double*));
Not in compile time, but a segmentation fault at runtime. F is a ***double by the way.
What should I check in makefile? Any guess?
Probably
FisNULLor pointing to an invalid memory location. SinceFgets dereferenced on the left side of the assignment, it needs to be properly initialized, so that it points to a memory location that can store thedouble**returned by malloc.