Hi All, 

Last night I did something dumb that breaks FreeCOM. …Again.

I already created a bug report for this at 
https://github.com/FDOS/freecom/issues/105

I just wanted to share it here as well.

So, I noticed an issue with the new VVIEW utility and wanted to generate a very 
large and simple text file for some testing. So, I made a relatively simple 
batch that was going to be used to create it. It was to echo a 64-bit hex 
value, a space, a 235 byte string and a CRLF over and over again. The Hex value 
and String being stored in an environment variable.

Silly me, those environment variables expand to far more characters than the 
standard 125 character line limit in batch files. So, I don’t know what I was 
thinking. Running that batch, I should have expected all of those “Commanline 
longer than 125 characters.” error messages. But, that was not the surprise. 

After it output about 23 of those messages, it threw an “out of memory error.” 
and returned to the command line. The shell would no longer execute any more 
commands. It would only keep giving “out of memory error.” messages. Requiring 
a restart.

Interestingly changing the character string to 230 characters or less, the 
batch merrily goes about echoing that data without issue. At 231+ characters, 
the issue pops up. 

Initially, the batch was using a combination of VSTR and VMATH along with SET 
/E to create the string and generate a fixed number of lines. The issue would 
occur even when the echo line was REM’d out and it just looped. The issue is 
not with VSTR or VMATH. The have been used for years by the FreeDOS installer 
to perform this kind of thing. 

But to eliminate any possibility of some strange interaction between those 
tools and FreeCOM, I created a different batch to remove them from the 
equation. For that, I created a text file containing 231 characters and made a 
dummy hex number. Used the type command to load the text file into the 
environment using "set /p". Then just repeatedly output the two environment 
strings using echo. 

This also brought down FreeCOM. 

Anyhow, more details and screen shots are provided in the bug report. 

Happy bug hunting.

:-)

Jerome




_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to