What can cause this SIGSEGV error?

后端 未结 2 1082
终归单人心
终归单人心 2021-01-26 08:47

I received a crash log that I cannot explain. I have searched around and it appears that the SIGSEGV has something to do with memory. But in my case there is nothin

2条回答
  •  渐次进展
    2021-01-26 09:25

    SIGSEGV is a problem the occurs when your application tries to access an address of memory that doesn't exists or some address where is already reserved to another program. I have the same issue with an application right now but I have to review my code to figure it out better. One clue for this kind of problem could be something equivalent to this (found in wikipedia):

    #include   
    

    int main(void)
    {
    char p = NULL; / p is a pointer to char that initializes poiting to "nowhere"*/
    * p = 'x'; /* Tries to save the char 'x' in 'no address'*/
    return 0;
    }

    I hope this can help someone.

提交回复
热议问题