1.很常见的原因:for while 死循环;
for(;;);
while(true);
while(1);
2.递归调用死循环;
3.对带有STL类对象的变量进行memset/ZeroMemory,比如vector/map/list,可能出现DEBUG环境下正常运行(DEBUG环境对某些操作进行了优化),RELEASE环境则莫名其妙线程卡死;
struct tagTest{
int nCount;
std::vector<char> vData;
}
tagTest t1;
ZeroMemory(&t1,sizeof(t1))
4.线程死锁;