From owner-cvs-all@FreeBSD.ORG Sun Jan 15 14:07:59 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0E3716A420 for ; Sun, 15 Jan 2006 14:07:59 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from nic.ach.sch.gr (nic.sch.gr [194.63.238.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9E5343D49 for ; Sun, 15 Jan 2006 14:07:56 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: (qmail 28071 invoked by uid 207); 15 Jan 2006 14:07:55 -0000 Received: from keramida@ceid.upatras.gr by nic by uid 201 with qmail-scanner-1.21 (sophie: 3.04/2.30/3.97. Clear:RC:1(81.186.70.138):. Processed in 0.084796 secs); 15 Jan 2006 14:07:55 -0000 Received: from dialup138.ach.sch.gr (HELO flame.pc) ([81.186.70.138]) (envelope-sender ) by nic.sch.gr (qmail-ldap-1.03) with SMTP for ; 15 Jan 2006 14:07:54 -0000 Received: by flame.pc (Postfix, from userid 1001) id A00FB1147A; Sun, 15 Jan 2006 16:06:12 +0200 (EET) Date: Sun, 15 Jan 2006 16:06:12 +0200 From: Giorgos Keramidas To: Jason Evans Message-ID: <20060115140612.GA84290@flame.pc> References: <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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jan 2006 14:08:00 -0000 On 2006-01-15 01:05, Jason Evans wrote: >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. Ah, I see! That explains why rolling jemalloc back 'fixes' the bug, quite nicely. Thanks :)