🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #323

UnLoadSeg()

#323
From: Francois Rouaix
Date: Mon, 03 Jul 1989 09:33
31 lines
1463 bytes
Hello dear techies,
I  have a doubt on the possibility that UnLoadSeg() might
Wait() somewhere. Does anybody knows for sure ?
The reason I ask this is the following:
A program detaches itself from CLI (ya know, hacking the
SegList), runs, and at the end, unloads itself with UnLoadSeg().
The very end of the code (ASM) looks like
callsys Forbid
* setup UnLoadSeg
callsys UnLoadSeg
moveq.l 0,d0
rts

And occasionally, I get a Guru (4)...
The only explanation I have yet is thatUnLoadSeg() waits,
memory freed is reallocated, the last two lines get
trashed, and boom.
Am I wrong ?
I could think of replacing the JSR to UnLoadSeg by a JMP, therefore
using the RTS of the routine, but since this bug appears quite randomly,
I'd like to be certain of its reason.

Thanx for any help
--Francois

-- 
*- Francois Rouaix                 //       We are all prisonners here       *
*- rouaix@inria.inria.fr         \X/           of our own device             *
*- SYSOP of Sgt. Flam's Lonely Amigas Club. (33) (1) 39-55-84-59 (Videotext) *
Disclaimer: Opinions expressed are my own, not those of my employer.
Technical Details
Message-ID: <1364@inria.inria.fr>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!mcvax!inria!rouaix

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!mcvax!inria!rouaix
From: rouaix@inria.inria.fr (Francois Rouaix)
Newsgroups: comp.sys.amiga.tech
Subject: UnLoadSeg()
Keywords: Waiting or not
Message-ID: <1364@inria.inria.fr>
Date: 3 Jul 89 09:33:53 GMT
Organization: FR.A.U.G.
Lines: 30