cmd for loop crashes on XP SP 2

G

Guest

For example on some Windows XP SP 2 (but not all) excuting that command:

for /f %i in ('echo hello') do echo %i

makes cmd.exe crash with an "Access Violation".

Here is the stack trace when crashing under WinDbg:

msvcrt.dll!_wcslen() + 0x8
msvcrt.dll!__wpopen() + 0x1e0
cmd.exe!_FParseWork@12() + 0x31c
cmd.exe!_eFor@4() + 0xab
cmd.exe!_Dispatch@8() + 0x274a
cmd.exe!_main() + 0x7bc9
cmd.exe!_mainCRTStartup() + 0x10e
kernel32.dll!_BaseProcessStart@4() + 0x23

It looks related to that problem:
http://support.microsoft.com/KB/886659

How can I get the working patch ?
The one I found here:
http://hf.xable.net/index.php
didn't solve the problem !

Best,
Zoe
 
J

Jon

I was more than a little surprised to hear the following from "Zoe"
For example on some Windows XP SP 2 (but not all) excuting that command:

for /f %i in ('echo hello') do echo %i

makes cmd.exe crash with an "Access Violation".

Here is the stack trace when crashing under WinDbg:

msvcrt.dll!_wcslen() + 0x8
msvcrt.dll!__wpopen() + 0x1e0
cmd.exe!_FParseWork@12() + 0x31c
cmd.exe!_eFor@4() + 0xab
cmd.exe!_Dispatch@8() + 0x274a
cmd.exe!_main() + 0x7bc9
cmd.exe!_mainCRTStartup() + 0x10e
kernel32.dll!_BaseProcessStart@4() + 0x23

It looks related to that problem:
http://support.microsoft.com/KB/886659

How can I get the working patch ?
The one I found here:
http://hf.xable.net/index.php
didn't solve the problem !

Best,
Zoe

A couple of other articles to read (relate to earlier versions of Windows
but the principles may still apply)

Explanation......
http://support.microsoft.com/kb/250998


Workaround - not for XP but might work
http://support.microsoft.com/kb/195009/EN-US/
 
G

Guest

Hi Jon,

I set the value DisableHeapLookaside
for cmd.exe and even for explorer.exe and kernel32.dll
and reboot to make sure but it unfortunately didn't solve the problem
most likely because I use Win XP as you pointed out.

Thanks a lot for your kind answer anyway.

All the best,
Zoe
 
Top