I have written the following program which should give runtime error of double free corruption.
#include <iostream>
#include <memory>
using namespace std;
int main()
{
shared_ptr<int> shared3(new int);
*shared3 = 9;
int *raw = shared3.get();
delete raw;
return 0;
}
A core dump should have come but it didn't. Please tell me how can I get double free runtime error in my environment?