Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

/C causes stack overflow in EKEYS v0.48.0

The following,
Code:
ekey /c alt-a=echo #
works fine in EKEYS v0.40.1 but fails miserably in v0.48.0. If I type
Code:
c:\test> this is a test
and then pres alt-a I get
Code:
C:\test>this is a tesTCC: (Sys) Recursion too deep; the stack overflowed.
"key"
If I do it again I get
Code:
C:\test>this is a testTCC: (Sys) Invalid access to memory location.
"key"
I'm running TCC 15.01.58 Windows XP [Version 5.1.2600]

-- Howard
 
The following,
Code:
ekey /c alt-a=echo #
works fine in EKEYS v0.40.1 but fails miserably in v0.48.0.

Code:
for ( size_t i = wcslen( NewLine ); i >= 0; i-- )
    NewLine[PrefixLen + i] = NewLine[i];     //  move the new command line up to make space

Oops!
 
Code:
for ( size_t i = wcslen( NewLine ); i >= 0; i-- )
    NewLine[PrefixLen + i] = NewLine[i];     //  move the new command line up to make space

Oops!
I don't know enough about what you're doing to understand what's wrong with that but it's obvious that you do since the new version you posted last night works great. Thanks!
 
I don't know enough about what you're doing to understand what's wrong with that but it's obvious that you do since the new version you posted last night works great. Thanks!

I'm decrementing a pointer, and the loop ends when it goes negative. Originally the variable was a regular (signed) integer, and the loop worked fine. Somewhere along the line I changed it to a 'size_t', which is an unsigned pointer. Decrementing an unsigned pointer until it goes negative... "fails miserably" is a polite way of putting it.

I don't even remember why I changed it. The buffer is big, but it's not that big.
 
Back
Top