是否有可能根据反汇编推断哪个线路有问题?

问题存在于017D0B5F call eax

 017D0B56 mov esi,esp 017D0B58 mov edx,dword ptr [ebp-20h] 017D0B5B push edx 017D0B5C mov eax,dword ptr [ecx+8] 017D0B5F call eax 017D0B61 cmp esi,esp 017D0B63 call @ILT+2525(__RTC_CheckEsp) (17C49E2h) 017D0B68 cmp dword ptr [ebp-2Ch],0 017D0B6C je CSourceStream::DoBufferProcessingLoop+10Ah (17D0B8Ah) 017D0B6E mov eax,dword ptr [ebp-2Ch] 017D0B71 push eax 017D0B72 push offset string "Deliver() returned %08x; stoppin"... (17F7278h) 

这是相应的来源:

  // Virtual function user will override. hr = FillBuffer(pSample); if (hr == S_OK) { hr = Deliver(pSample); pSample->Release(); // downstream filter returns S_FALSE if it wants us to // stop or an error if it's reporting an error. if(hr != S_OK) { DbgLog((LOG_TRACE, 2, TEXT("Deliver() returned %08x; stopping"), hr)); return S_OK; } 

是否有可能根据反汇编推断哪个线路有问题?

UPDATE

__RTC_CheckEsp是什么意思?

UPDATE2

在debugging器中重现

替代文字

UPDATE3

替代文字

看起来像是pSample-> Release()调用 – 你得到了什么错误?

 017D0B56 mov esi,esp 017D0B58 mov edx,dword ptr [ebp-20h] // get the pSample this pointer 017D0B5B push edx // push it 017D0B5C mov eax,dword ptr [ecx+8] // move pSample to eax 017D0B5F call eax // call it 017D0B61 cmp esi,esp // maybe a stack/heap check? 017D0B63 call @ILT+2525(__RTC_CheckEsp) (17C49E2h) 017D0B68 cmp dword ptr [ebp-2Ch],0 // if hr!=S_OK 017D0B6C je CSourceStream::DoBufferProcessingLoop+10Ah (17D0B8Ah) 017D0B6E mov eax,dword ptr [ebp-2Ch] 017D0B71 push eax // get ready to call DbgLog 017D0B72 push offset string "Deliver() returned %08x; stoppin"... (17F7278h) 

您可以使用DIA SDK查询与RVA对应的源线。 请注意,DIA需要符号(即PDB文件)。 看看这个关于RVAs的SO 问题 。

在确定所讨论的反汇编的RVA之后,可以加载该二进制文件的PDB。 创建一个会话,然后查看IDiaSession接口上的IDiaSession findLinesByRVA()函数。 这将返回一个对应于该RVA的行的枚举。 查询生成的IDiaLineNumber实例,以查找行号对应的文件。

响应您的更新, __RTC_CheckEsp是一个调用,用于验证esp ,堆栈,寄存器的正确性。 它被调用以确保esp的值在函数调用中保存。 这是编译器为你插入的东西。