Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!elroy!brad From: brad@gobi.jpl.nasa.gov (Brad Pickering) Newsgroups: comp.os.minix Subject: MacMINIX (bugs?) Message-ID: Date: 19 Jun 91 13:42:05 GMT Sender: news@elroy.jpl.nasa.gov (Usenet) Distribution: comp Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 28 Nntp-Posting-Host: ais-gw.jpl.nasa.gov I have one bug and one possible bug that I'd like to point out. Both of these are harmless. The bug is in the library routine 'relocate'. when relocate is called by macboot to relocate itself it calls the routine with a pointer to itself and 2 NULL pointers. The first NULL is supposed to point to the text segment but in this case the text segment can be found using the first argument (the pointer to the program header). This is correct, no bug here. The second NULL is supposed to be an array of longs that relocate fills in with the sizes of the segments. In the macboot case we don't care what these sizes are so the NULL makes sense. It is supposed to tell the relocate code that we don't wan't these values filled in. The bug is that relocate puts a value in the first element of the array even when a NULL is passed as the pointer to the array. This ends up putting a value in location 0 in memory. This is harmless though because this value is only used during reset. The second thing I'm not sure if it is a bug, but it looks strange to me. The startup code for macboot allocates space below a5 for quickdraw globals. Inside Mac says that quickdraw globals take 206 bytes but macboot allocates 210. I'm probably missing something here but what is it? Anyway, I think the worst that could happen is that were wasting 4 bytes. big deal. any comments would be appreciated -- -- Brad Pickering brad@gobi.jpl.nasa.gov --