Understanding 'double free or corruption' error

后端 未结 1 1704
自闭症患者
自闭症患者 2021-01-23 23:31

I am calling a C++ application from the python script (OS Ubuntu 14.04) like this:

import sys, subprocess
run = subprocess.Popen([\'app         


        
相关标签:
1条回答
  • 2021-01-24 00:08

    Double free is exactly what it means :

    int *a = new int;
    delete a;
    delete a;
    

    For corruption something like :

    int *a = new int[10];
    a++;
    delete a;
    

    This message is generated by glibc when an app request to free some memory that was already freed, or the address does not correspond to an address obtained at allocation time.

    0 讨论(0)
提交回复
热议问题