www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/05/14/11:57:47

Date: Fri, 14 May 1993 11:09 EDT
From: "Wonkoo Kim, EE, U. of Pittsburgh" <WKIM AT vms DOT cis DOT pitt DOT edu>
Subject: New fact on system() error
To: djgpp AT sun DOT soe DOT clarkson DOT EDU

Hi.

I found a new fact on system() error, which occurs only under a certain 
condition.  Having this error should be lucky(?).
(System: 486-25MHz/8MB/msdos5.0/qemm, djgpp/gcc 1.09/2.2.2 with no patching)

In my arguments, READ(fxxKB) stands for the following steps:
	1. system("zcat fxxKB.Z > fxxKB")   /* uncompressing step */
	2. allocate xx KB memory            /* file size of fxxKB is xx KB. */
	3. read fxxKB file into memory

The new fact is:
If the allocated memories sumed up to 64KB, the next system() failed.
That is, after the program(.exe size 125KB) started, any further READ() failed 
after four READ(f16KB)'s or single READ(f64KB) had been called.

If the allocated memory chunks didn't sum up to 64KB (in the order of calling 
sequence), there was no problem with system() call.
I.e. the followings are all worked:
	READ(f16KB); READ(f64KB); READ(anything); ...
	READ(f16KB); READ(f16KB); READ(f64KB); READ(anything); ...
	READ(f16KB); READ(f16KB); READ(f16KB); READ(f64KB); READ(anything); ...
	READ(f256KB); READ(anything); ...

In summary, there is a critical point in memory address to harm the system()
call.  If the boundary of allocated memory chunks does not fall to the critical 
point, there is no problem with system() call.  So, encouting this error is 
very(?) rare.  (Again, I used the unpatched original go32 1.09)

Thanks.
Regards,

Wonkoo.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019