char datetime[DATETIME_LEN];
time_t timer;
struct tm* tm_info;
timer = time(NULL);
tm_info = localtime(&timer); // debug: tm_info: 0xcccccccccccccccc {tm_sec=??? tm_min=??? tm_hour=??? ...}
if (NULL == tm_info) // debug: 0xffffffffba9b07b0 {tm_sec=??? tm_min=??? tm_hour=??? ...}
{
return;
}
strftime(datetime, DATETIME_LEN, "%Y%m%d_%H%M%S", tm_info); // Crush is here
At place where tm_info is used, tm_info's content is
Any ideas about why unable to read memory? Does anyone had the same issue? By the way, if I use online compiler, I have no this issue.
