栈不平衡与调用约定
1. 初步分析
某进程崩溃必现。
打开崩溃dmp,结合c++源代码,崩溃大致发生在某dll代码里的这句:SAFE_DELETE(pContentData);
En_HP_HandleResult CTcpOperation::OnClintReceive(HP_Client pSender, HP_CONNID dwConnID, const BYTE * pdata, int iLength)
{
LOG_INFO(_T("Client OnReceive iLength is %d"), iLength);
if (iLength == sizeof(STcpTransferData))
{
LPVOID pVoidTemp = nullptr;
STcpTransferData cTransferData;
memmove(&cTransferData, pdata, sizeof(STcpTransferData));
if (CTcpOperation::GetInstance()->CheckAndSetData(ETransferType::SenddataLength, cTransferData, dwConnID, pVoidTemp))//单条数据总大小
{
HP_Client_SetExtra(pSender, pVoidTemp);
LOG_INFO(_T("OnClintReceive new message set length"));
ret