all: According to this page c++ implementations typically uses atomic ref count to ensure thread safety, but this seems buggy in some cases.
```
void func2(shared_ptr<int>* x) {
shared_ptr<int> a(*x);
*a += 1;
}
thread func1() {
shared_ptr<int> a1(new int(10));
thread t (func2, &a1);
return t;
}
```
As the above code shows, if the copy construction in func2 happens after the internal reference count of a1 decreases, the pointer will get deleted twice, right?