I saw a lot forum with this ask, but in all answers it was because they don't verify the returned pointer. But in my case, I'm working on embedded system (so no Valgrind or Gdb), and I debug with printf… So there where my program make a segfault :
void myfunction(…)
{
CAM_t *n = NULL;
/* Some code */
printf("before calloc\n");
n = calloc(1, sizeof *n);
printf("calloced\n");
/* Rest of code */
}
When I run it I've got :
before calloc
Segmentation fault
Does anyone have a suggestion in why I've this fault ?
Thanks for help !