From owner-freebsd-current Fri Apr 30 12:54:12 1999 Delivered-To: freebsd-current@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id D453B158F8 for ; Fri, 30 Apr 1999 12:54:09 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id MAA39863; Fri, 30 Apr 1999 12:54:01 -0700 (PDT) (envelope-from dillon) Date: Fri, 30 Apr 1999 12:54:01 -0700 (PDT) From: Matthew Dillon Message-Id: <199904301954.MAA39863@apollo.backplane.com> To: John Polstra Cc: Poul-Henning Kamp , freebsd-current@FreeBSD.ORG Subject: Re: Any action on PR 10570 ? getting closer to 65K :-( References: Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :If we're going to split hairs, how about this: To make a reference :count exceed 2^32, you need to have >2^32 different pointers pointing :to it. A pointer takes 2^2 bytes on the i386. So that's 2^34 bytes :of memory you'd need just to store the pointers. : :You'd better hope you don't get a panic on that mother! It might :take quite awhile to write a 16 GByte crash dump. :-) : :> you certainly cannot create 2^32 routes without having other :> significant problems, and while I agree with Rod that the overflow :> should be checked, I think it should be done with a KASSERT() if not :> just with a comment. : :A check would be worthwhile to detect bugs in the code (increments :without matching decrements). If you want to check for bona-fide :overflows, you'd best be prepared to check every counter in the :system. : :John :--- : John Polstra jdp@polstra.com We do check some critical reference-count fields for overflow. But it doesn't make sense to check all of them. This particular reference count has no related bugs that we know of apart from legally bumping past 65536, so it would be kinda silly to check it for an overflow. If one insisted, I suppose we could add a check if INVARIANTS is enabled but I don't see any advantage to doing so in this case. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message