@LINES, long lines, TCC disappears

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#3
disappeared.

Not particularly surprising. Why would you do such a thing?
I didn't choose that file specifically. It was simply included in a DO set.

I am of the opinion that an app should never crash as a result of what the user does (short of deliberate sabotage). An error message, or warning, or simply "1" (for a non-empty file containing no newlines) would have been fine.
 
Nov 3, 2010
9
0
#5
On Thu, 06 Oct 2011 18:09:38 -0400, rconn <>
wrote Re RE: [Support-t-3267] Re: @LINES, long lines, TCC disappears:


>---Quote---
>> I am of the opinion that an app should never crash as a result of
>> what the user does (short of deliberate sabotage).
>---End Quote---
>It's a nice theory. In the real world, the amount of error trapping the
>programmer can do is finite, while the number of bizarre things a user can
>do is infinite.
Well put.
 
#6
It's a nice theory. In the real world, the amount of error trapping the
programmer can do is finite, while the number of bizarre things a user can
do is infinite.
Cute quip.

The file contained 1,048,576 bytes (of text) and no newlines. Had that file contained 1,048,575 or 1,048,577 bytes, TCC would not have crashed and would have correctly returned 0.

That also goes for any file with no newlines whose size is exactly a power of two greater than 65536 ... crash ... one more or one fewer character ... no crash.

That certainly is peculiar.
 
May 30, 2008
206
1
#7
Cute quip.

The file contained 1,048,576 bytes (of text) and no newlines. Had that file contained 1,048,575 or 1,048,577 bytes, TCC would not have crashed and would have correctly returned 0.

That also goes for any file with no newlines whose size is exactly a power of two greater than 65536 ... crash ... one more or one fewer character ... no crash.

That certainly is peculiar.
Sounds to me as if it crashes if the file size is an exact multiple of the buffer size used for reading the file contents.
 
#8
On Fri, 07 Oct 2011 07:14:55 -0400, nikbackm <> wrote:

|Sounds to me as if it crashes if the file size is an exact multiple of the buffer size used for reading the file contents.

I suspected that too but it was easier to check powers of 2.

I just tried 3*2^16 ... crash.

TCC 13.00.24
Module=D:\tc13\TakeCmd.dll
Address=10029C11
Exception=C0000005
EAX=03260000 EBX=016BFC94 ECX=0165CA61 EDX=77AE70B4
ESI=03230000 EDI=03230000 EBP=016BFC08 ESP=0165CAB0
CS=0000001B DS=00000023 ES=00000023 SS=00000023
Flags=00010216

Stack:
1 : TakeCmd.dll 00000001:00028c11