Re: Unhandled exception
From: Noël Danjou (noel_at_noeld.com)
Date: 04/21/04
- Next message: Noël Danjou: "Re: Unhandled exception"
- Previous message: David Lowndes: "Re: Disabled CTreeControl question"
- In reply to: Gary Chang: "Re: Unhandled exception"
- Next in thread: Gary Chang: "Re: Unhandled exception"
- Reply: Gary Chang: "Re: Unhandled exception"
- Reply: Gary Chang: "Re: Unhandled exception"
- Reply: Yan-Hong Huang[MSFT]: "Re: Unhandled exception"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 21 Apr 2004 17:12:28 +0200
Hi Gary,
Thanks for reviewing this thread.
Just like you I don't trust the "workaround" though each time the ASSERT
line is present the exception does not occur!
By the way I recompiled the whole code with BoundsChecker (BC) 7.2 and tried
again, the same behavior happens and BC does not report any stack corruption
or overrun. Now I recompiled the whole code w/o BC.
I identified the exact line in the disassembly which causes the problem
though I still don't understand why.
Here is what happens when I put the ASSERT line and the code works:
BOOL CWebRequest::SaveResponse(LPCTSTR pszFileName)
{
ebp = 12f998
004FB330 push ebp
esp = 12f964
004FB331 mov ebp,esp
004FB333 push 0FFFFFFFFh
esp = 12f960
004FB335 push offset
__ehhandler$?SaveResponse@CWebRequest@@QAEHPBD@Z (669A16h)
esp = 12f95c
004FB33A mov eax,dword ptr fs:[00000000h]
004FB340 push eax
esp = 12f958
004FB341 mov dword ptr fs:[0],esp
004FB348 push ecx
esp = 12f954
004FB349 sub esp,80h
esp = 12f8d4 -> expected and the remaining of the code is correctly executed
Now same code without the ASSERT line:
BOOL CWebRequest::SaveResponse(LPCTSTR pszFileName)
{
ebp = 12f998
004FB330 push ebp
esp = 12f964
004FB331 mov ebp,esp
004FB333 push 0FFFFFFFFh
esp = 12f960
004FB335 push offset
__ehhandler$?SaveResponse@CWebRequest@@QAEHPBD@Z (669A16h)
esp = 12f95c
004FB33A mov eax,dword ptr fs:[00000000h]
004FB340 push eax
esp = 12f958
004FB341 mov dword ptr fs:[0],esp
004FB348 push ecx
esp = 12f954
004FB349 sub esp,80h
esp = ff46f888 -> wrong hence unhandled exception
Unhandled exception at 0x004fb32f in TestApp.exe: 0xC0000005: Access
violation writing location 0xff46f884.
The question is why the sub operation fails????
Unfortunately I cannot upload the code to the public server because it is
part of a big application which cannot be published.
If something can be made through application sharing, remote assistance or
any other method please does not hesitate to contact me through my real
e-mail address. Thank you.
Best regards,
-- Noël http://noeld.com
- Next message: Noël Danjou: "Re: Unhandled exception"
- Previous message: David Lowndes: "Re: Disabled CTreeControl question"
- In reply to: Gary Chang: "Re: Unhandled exception"
- Next in thread: Gary Chang: "Re: Unhandled exception"
- Reply: Gary Chang: "Re: Unhandled exception"
- Reply: Gary Chang: "Re: Unhandled exception"
- Reply: Yan-Hong Huang[MSFT]: "Re: Unhandled exception"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|