From owner-freebsd-i386@FreeBSD.ORG Wed Mar 22 09:30:20 2006 Return-Path: X-Original-To: freebsd-i386@hub.freebsd.org Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C27716A400 for ; Wed, 22 Mar 2006 09:30:20 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 789A643D77 for ; Wed, 22 Mar 2006 09:30:11 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k2M9UBx3082062 for ; Wed, 22 Mar 2006 09:30:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k2M9UBle082057; Wed, 22 Mar 2006 09:30:11 GMT (envelope-from gnats) Resent-Date: Wed, 22 Mar 2006 09:30:11 GMT Resent-Message-Id: <200603220930.k2M9UBle082057@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-i386@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jan Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9A2116A41F for ; Wed, 22 Mar 2006 09:24:49 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 383FA43D5E for ; Wed, 22 Mar 2006 09:24:48 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k2M9OlpK073781 for ; Wed, 22 Mar 2006 09:24:47 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k2M9Olul073778; Wed, 22 Mar 2006 09:24:47 GMT (envelope-from nobody) Message-Id: <200603220924.k2M9Olul073778@www.freebsd.org> Date: Wed, 22 Mar 2006 09:24:47 GMT From: Jan To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: i386/94827: mmap with given (void *addr) may lock memory-manager X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2006 09:30:20 -0000 >Number: 94827 >Category: i386 >Synopsis: mmap with given (void *addr) may lock memory-manager >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Mar 22 09:30:10 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Jan >Release: 5.3 >Organization: Concept Engineering GmbH >Environment: FreeBSD star2 5.3-RELEASE FreeBSD 5.3-RELEASE #4: Thu Nov 17 12:33:20 CET 2005 jrr@star2:/usr/src/sys/i386/compile/STAR2 i386 >Description: Hi! Given the following code: -- 8< -- #include #include #include int main(){ printf("mmap: %p\n", mmap( (void*)0x1000, 0x8047004, PROT_NONE, MAP_PRIVATE|MAP_ANON|MAP_NORESERVE, -1, 0 )); printf("malloc: %p\n", malloc(4)); return 42; } -- 8< -- returns NULL for the malloc on my machine ( also happens on 3.4-RELEASE; does not fail on AIX/Solaris/Windows/Linux/HPUX ) It runs well if *addr is set to NULL or if the requestet memory is a bit smaller. The prot. flags does not affect the behaviour. >How-To-Repeat: If the code doesnt show anything wrong, try to increase the requested mmap mem. There seems to be a border at 0x8047000 on my machines. Anything below 0x8047000 works fine here. >Fix: In fact, i need a fix :) >Release-Note: >Audit-Trail: >Unformatted: