From owner-freebsd-bugs Wed Oct 6 16:23:21 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from awfulhak.org (dynamic-54.max1-du-ws.dialnetwork.pavilion.co.uk [212.74.8.54]) by hub.freebsd.org (Postfix) with ESMTP id 12E881579E for ; Wed, 6 Oct 1999 16:23:13 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by awfulhak.org (8.9.3/8.9.3) with ESMTP id XAA01515; Wed, 6 Oct 1999 23:11:28 +0100 (BST) (envelope-from brian@lan.awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost.lan.Awfulhak.org [127.0.0.1]) by hak.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id VAA01010; Wed, 6 Oct 1999 21:32:12 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <199910062032.VAA01010@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.0.2 2/24/98 To: freebsd-bugs@FreeBSD.ORG Cc: rivers@dignus.com Subject: Re: bin/14145: PPP userland/client (3.3-REL) throws core In-reply-to: Your message of "Wed, 06 Oct 1999 16:46:05 BST." <199910061546.QAA01632@hak.lan.Awfulhak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 06 Oct 1999 21:32:11 +0100 From: Brian Somers Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 > > Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message