From owner-cvs-src@FreeBSD.ORG Sun Jan 15 09:05:44 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67A7116A41F; Sun, 15 Jan 2006 09:05:44 +0000 (GMT) (envelope-from jasone@FreeBSD.org) Received: from lh.synack.net (lh.synack.net [204.152.188.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA56E43D46; Sun, 15 Jan 2006 09:05:43 +0000 (GMT) (envelope-from jasone@FreeBSD.org) Received: by lh.synack.net (Postfix, from userid 100) id B63D15E48EC; Sun, 15 Jan 2006 01:05:43 -0800 (PST) Received: from [192.168.168.203] (moscow-cuda-gen2-68-64-60-20.losaca.adelphia.net [68.64.60.20]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by lh.synack.net (Postfix) with ESMTP id BE6E75E4884; Sun, 15 Jan 2006 01:05:41 -0800 (PST) In-Reply-To: <20060115032810.GA99817@flame.pc> References: <200601121809.k0CI9QGV028693@repoman.freebsd.org> <20060112182804.GA1047@flame.pc> <20060113012900.GA16082@flame.pc> <554CC8A8-35FB-424A-B883-505C26ECBBE8@FreeBSD.org> <20060114213238.GA15253@flame.pc> <6FD0F2BA-88E3-4E82-A5F8-D89051AEEECA@FreeBSD.org> <43C97BCA.6030201@gmail.com> <20060115013248.GA28047@flame.pc> <43C9BDE3.8030408@gmail.com> <20060115032810.GA99817@flame.pc> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Jason Evans Date: Sun, 15 Jan 2006 01:05:38 -0800 To: Giorgos Keramidas X-Mailer: Apple Mail (2.746.2) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on lh.synack.net X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, Pascal Hofstee Subject: Re: cvs commit: src/lib/libc/stdlib malloc.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jan 2006 09:05:44 -0000 On Jan 14, 2006, at 7:28 PM, Giorgos Keramidas wrote: > > Jason, > > is this related to the malloc changes in any way. I'm curious why the > default return type of `int' wasn't a problem so far. Has the > definition of userland pointers changed recently from a type that > could > fit in an `int' to something larger? On amd64, jemalloc uses mmap() to get chunks of memory to carve up. It's possible that these chunks are above 4 GB, which means that the high bits are important, but sizeof(int) is 4, not large enough to store such a pointer. With sbrk(), the addresses are rather small, so the high bits would never be used in that case. This bug would slip by with most (all?) other allocators, and would also slip by jemalloc if USE_BRK were defined for amd64 in malloc.c. Jason