>Subject: WinDbg: OutputDebugString() replaces memory on “DBWIN_BUFFER”
text!?!
From: “Grabelkovsky, Michael” <michael.grabelkovsky>
> Date: Tue, 26 Jun 2007 16:03:04 +0100
> X-Message-Number: 16
.
>I run into strange problem.
>When I’m calling OutputDebugString() it sometimes replace part of my
>memory on L"DBWIN_BUFFER" text!?!
>
>Over more, because I’m debugging application layer solution, I may
start
>it in the test mode under VS2005. And it works fine!
>The problem appears only under WinDbg.
>
>The scanning of Internet does not add me hints.
>What is happened?
>It is not my first experience with OutputDebugString() and I have not
>any problems with it before…
>
>Thanks for help,
>Michael.
>----------------------------------------------------------------------
>
>Subject: RE: WinDbg: OutputDebugString() replaces memory on
“DBWIN_BUFFER” >text!?!
>From: xxxxx@hotmail.com
>Date: Tue, 26 Jun 2007 11:20:01 -0400 (EDT)
>X-Message-Number: 17
>
>Michael -
>
>Could you post the code you’re having problem with, and specify if this
is >32-bit or 64-bit code?
>
> -Steve
OK,
I have 2003 Server, 32 bit.
I have found, OutputDebugString() writes L"DBWIN_BUFFER" text exactly
over L"C:\windows\system32\Kernel32.dll" module name!?!
The last line has address in the end of virtual memory 0x7ffdc00.
Over more, I’m working around LoadLibraryExW() interception (for
protection purpose) and when I’m starting under WinDbg I see strange
calls to it. As example, I see call with parameters (“”, 0, 0) which
returns the name of the last loaded DLL in the buffer is shown by
parameter 1 and valid module handle!?!
I have single thread test environment which excludes multithreading
problems. And I checked that all calls are coming on the same thread.
Other, I checked the possibility of calling LoadLibraryExW() itself. No
recursive calls. But the text “Stack unwind information not available.
Following frames may be wrong” sometimes is in the Call Stack!?!
I have not seen any named problem, when starts the same(!) test mode
under VS2005…!?!</michael.grabelkovsky>