Take Command / TCMD/LE / TCC/LE 10.00.53 uploaded

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#3
> * Added a check for infinite command loops (alias loops nested in variable loops)
Thank you for saving my bacon the next time I make that mistake!

--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.
 
#4
TCC 10.00.53 Windows XP [Version 5.1.2600]
TCC Build 53 Windows XP Build 2600 Service Pack 3



> * Added a check for infinite command loops (alias loops nested in variable loops)
Related failures remain in these tests of broken syntax / invocation.

1) alias zzz `for %h in (1) do zzz`
Invoke: zzz
Terminates immediately without warning and:

TCC 10.00.53
Module=C:\4NT\TakeCmd.dll
Address=10043AB6
Exception=C00000FD
EAX=0000002E EBX=00423298 ECX=00423298 EDX=0042002F
ESI=100AB302 EDI=00423218 EBP=004231FC ESP=00423000
CS=0000001B DS=00000023 ES=00000023 SS=00000023
Flags=00010202

Stack:
1 : TakeCmd.dll 0001:00042ab6


2) alias zzz `if 1==1 zzz`
Invoke: zzz
Give the Windows "Do you want to send this" box and:

TCC 10.00.53
Module=C:\4NT\TakeCmd.dll
Address=1008C867
Exception=C00000FD
EAX=00422000 EBX=00000000 ECX=00421E3C EDX=00000000
ESI=00459F90 EDI=00000000 EBP=00439EFC ESP=00439F64
CS=0000001B DS=00000023 ES=00000023 SS=00000023
Flags=00010206

Stack:
1 : TakeCmd.dll 0001:0008b867


3) alias zzz `set n=%@inc[%n] %+ if %n lt %1 (echo %n %+ zzz %1)`
Invoke: set n=0 %+ zzz 9999
After several hundred lines, get the Windows box and:

TCC 10.00.53
Module=C:\4NT\TakeCmd.dll
Address=1008C867
Exception=C00000FD
EAX=00422000 EBX=00000000 ECX=0042126C EDX=00000000
ESI=004593C0 EDI=00000000 EBP=0043932C ESP=00439394
CS=0000001B DS=00000023 ES=00000023 SS=00000023
Flags=00010206

Stack:
1 : TakeCmd.dll 0001:0008b867


--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#5
Jim Cook wrote:

> TCC 10.00.53 Windows XP [Version 5.1.2600]
> TCC Build 53 Windows XP Build 2600 Service Pack 3
>
>
>
>
> ---Quote---
>> * Added a check for infinite command loops (alias loops nested in variable loops)
> ---End Quote---
> Related failures remain in these tests of broken syntax / invocation.
I would recommend you don't do those things ...

Rex Conn
JP Software
 
#6
>>> * Added a check for infinite command loops (alias loops nested in variable loops)
>> ---End Quote---
>> Related failures remain in these tests of broken syntax / invocation.
> ---End Quote---
> I would recommend you don't do those things ...
Except for testing, and an accidental search/replace error, I don't. I
certainly am not exercising any significant depth of nesting. The
above cases that still exist were generated because I was
intentionally trying to poke it in hurtful places, so when it hurt I
wasn't terribly surprised. My initial problem report, which is now
fixed, was not a pathological case but I fell into by accident.

Our own product had to protect against a similar "infinite" recursion
which we defined to be about 16. It seems the only useful tests are
that two levels must work, and much more than that is almost always a
runaway.

Thanks again for the fix. I do appreciate it.
--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.