因为在Debug中有ASSERT断言保护,所以要崩溃,而在Release优化中就会删掉ASSERT,所以会出现正常运行。void func(){ char b[2]={0}; strcpy(b,"aaaa");}Debug版崩溃,Release版正常