🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #6812

Re: Memory allocation error

#6812
From: Joe Huffman
Date: Fri, 24 May 1991 23:56
29 lines
1656 bytes
fisher@sc2a.unige.ch writes:

>I probaly don't need to tell you that COMMAND.COM has a resident portion,
>loaded low, and a much larger portion, loaded high, which can be overwritten
>by memory allocation requests of child processes (i.e. programs that are run).
>Whenever you exit a program, the resident portion checks whether the high
>portion has been overwritten, and loads it again from disk if needed.

>[...stuff about applications that cause crashes related to resident 
portion...]

My brother discovered that the check for the overwrite is faulty.  It is
quite easy to overwrite part of the resident portion and not have it 
detected.

--------- high memory -------\
			      \
                               ---      Resident portion
      --magic position--      /
----- not so high memory ----/

You can trash from 'magic position' to 'high memory' that has been given to 
you by a valid memory allocation call, free it, exit your program and get a
nasty message telling you to reboot.  If you were to trash all of it then
it is detected and everything is fine.

It's a bug in DOS 4.01 (and probably others).
-- 
joe@proto.com
Technical Details
Message-ID: <1991May24.235640.17077@proto.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!wuarchive!uunet!proto!joe
References: <1991May20.055124.24741@ariel.unm.edu> <1991May23.092728.440@sc2a.unige.ch>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!wuarchive!uunet!proto!joe
From: joe@proto.com (Joe Huffman)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Memory allocation error
Message-ID: <1991May24.235640.17077@proto.com>
Date: 24 May 91 23:56:40 GMT
References: <1991May20.055124.24741@ariel.unm.edu> <1991May23.092728.440@sc2a.unige.ch>
Organization: Prototronics @ Sandpoint, Idaho
Lines: 29