Date: Fri, 3 Oct 1997 14:08:12 -0400 (EDT) From: Thomas David Rivers <rivers@dignus.com> To: nate@mt.sri.com, phk@critter.freebsd.dk Cc: gram@cdsec.com, hackers@FreeBSD.ORG Subject: Re: Bug in malloc/free (was: Memory leak in getservbyXXX?) Message-ID: <199710031808.OAA16774@lakes.dignus.com>
next in thread | raw e-mail | index | archive | help
> In message <199709181912.NAA13699@rocky.mt.sri.com>, Nate Williams writes: > > >[ 'hangs' in malloc due to memory over-write causing circular lists ] > > > >> >> This is about the only way you could get it to loop I think. That means > >> >> that somebody wrote to memory malloc hadn't passed them (ie: your code). > >> > > >> >Yikes, this would be 'Hard to Do', even by design (ie; self-modifying > >> >code). But, stranger things have happened, especially with dealing with > >> >malloc/free. > >> > >> No, all you have to do is to make each allocation have it's own set of > >> pages, munmap them when free is called and never use those pages again. > >> > >> You run out of address space really fast, and it is slow, but it works. > > > >It's slow, but how would it cause malloc to hang? > > It wouldn't, it would detect accesses to free'ed memory. > Sorry to reply so late for this - I'm just now getting to it... Anyway; such a package already exists, and runs on FreeBSD. It's called Electric Fence. I'd be happy to send anyone the information & source... - Dave Rivers -
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710031808.OAA16774>