Date: Wed, 06 Oct 1999 21:32:11 +0100 From: Brian Somers <brian@Awfulhak.org> To: freebsd-bugs@FreeBSD.ORG Cc: rivers@dignus.com Subject: Re: bin/14145: PPP userland/client (3.3-REL) throws core Message-ID: <199910062032.VAA01010@hak.lan.Awfulhak.org> In-Reply-To: Your message of "Wed, 06 Oct 1999 16:46:05 BST." <199910061546.QAA01632@hak.lan.Awfulhak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Oops, rivers@dignus.com said: > Brian, > You may want to re-send your e-mail. I just sent my reply directly > to you... > Those people who are experiencing the problem may take up your > offer... Unfortunately, I'm not one of them... I'd just thought I'd > offer some suggestions of where to look. > > And, let me add one more item - you can "scribble" the stack and > not experience a core dump, or, if you're unlucky (or lucky in this > case) you would. Electric Fence will find the scribbling in either > case. (i.e. you could verify no writes past the end of the array, > even if those writes were innocuous in your case.) > > I'd volunteer myself; but I don't use user-mode ppp. I just trying > to help find ways of locating the issues... I wasn't paying attention to the addressees ! For the benefit of the list & pr, this is what I said by me in reply to Dave's mail: > > > I think the only way to catch something like this is to get the > > > compiler to put the function return address in read-only memory so > > > that a stack-scribble will produce a core when it happens rather than > > > after the fact.... Do you know if gcc is capable of doing this ? Do > > > you know of any better ways of tackling the problem ? > > > > > > > Typically, for stack-scribbling, the program has to do one of > > two things: > > > > 1) Take the address of an automatic and pass that to > > a subroutine. > > > > 2) Write over the end of an automatic array. > > Well, my money's on 2). The TCP/IP header buffer is written to an > auto array and then fondled by the vj uncompress stuff. I've > eyeballed the code 'till I'm sick of it and I can't see any problems. > > > When this happens to me, I look for any automatic arrays with > > fixed sizes, or automatics that I take the address of. > > > > Then, if you malloc() that data instead of using automatics, > > an tool like Electric Fence will quickly point out the problem. > > > > Just one approach I've used in the past. > > Sounds good. Anyone with the problem willing to do the honours ? I > would, but I've never encountered the problem :-/ > > > - Dave Rivers - > > Thanks. > > -- > Brian <brian@Awfulhak.org> <brian@FreeBSD.org> > <http://www.Awfulhak.org> <brian@OpenBSD.org> > Don't _EVER_ lose your sense of humour ! <brian@FreeBSD.org.uk> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910062032.VAA01010>