From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28772 invoked by alias); 1 Apr 2003 04:46:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 28751 invoked by uid 71); 1 Apr 2003 04:46:00 -0000 Resent-Date: 1 Apr 2003 04:46:00 -0000 Resent-Message-ID: <20030401044600.28750.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, gschafer@zip.com.au Received: (qmail 27243 invoked by uid 48); 1 Apr 2003 04:38:57 -0000 Message-Id: <20030401043857.27242.qmail@sources.redhat.com> Date: Tue, 01 Apr 2003 04:46:00 -0000 From: gschafer@zip.com.au Reply-To: gschafer@zip.com.au To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: other/10284: mmap test configury - subtle breakage exposed by corner case X-SW-Source: 2003-04/txt/msg00007.txt.bz2 List-Id: >Number: 10284 >Category: other >Synopsis: mmap test configury - subtle breakage exposed by corner case >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Apr 01 04:46:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Greg Schafer >Release: 3.2.2, 3.3, 3.4 >Organization: >Environment: i686-pc-linux-gnu >Description: Under normal conditions gcc configure will report:- checking for working mmap from /dev/zero... yes checking for working mmap with MAP_ANON(YMOUS)... yes But in the conditions described below it erroneously reports:- checking for working mmap from /dev/zero... no checking for working mmap with MAP_ANON(YMOUS)... no Investigation has revealed that the problem happens only when the "/etc/ld.so.cache" file is less than 1 memory page in size. This can happen for example when building up a new system inside a chroot environment. It appears to be a subtle timing issue as evidenced by the strace logs and analysis contained in the thread that starts here:- http://archive.linuxfromscratch.org/mail-archives/lfs-dev/2003/03/0170.html >How-To-Repeat: Configure gcc in an environment where the "/etc/ld.so.cache" file is less than 1 memory page in size. NOTE - rm'ing the cache file does NOT reproduce the problem. >Fix: A patch has been worked up by:- Donald Smith I've tested it thoroughly and it does the right thing on my platform and in the conditions described above. Patch is attached. >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/x-gunzip; name="gcc-3.2.2.mmap_test.patch.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="gcc-3.2.2.mmap_test.patch.gz" H4sICH0/dD4AA2djYy0zLjIuMi5tbWFwX3Rlc3QucGF0Y2gAfVJdb9MwFH1ufsVhL6R1k+aj66aG Si1iSEiAeOC9ylwnNUviynbUZhP/netkZSBYHUV2fM+559x7s5NFgaD9qlFyHqRhQo/SspzR54yr ppBlq8VL8O97LwiCi8RREkVpECVBNEccL+Ob5XwRRucFFsdR5DHGXhN45qdBvEASLeNoGaX/8Ndr BPMkWkwXYP1+g/XagxXGblP4Yw9PHgC+zzUmpykmHb2PmccA2VjIzIOLn7BC3qimzg/wD+U4c5ey gE+BFfyBPv6y+bb9uPn0+e7D+Fk4ng/C8fU0SXvlgda9RoNbB6G10ltxkhb+lfOKFLXTTq6miK+d vMdmE2xg2ntbCeicC1BndtJK1UBx3mqD4140sHuBahcaFfKc07mQhJcGlTCGgjmhG+HqRS1qpTsc 8pIADYx8FCG+7wnL89YI06eiFPwBVqHIZTUoNErXeVV1ILtH1Va75q0N+4zvBRmkX4TgObdtDyqF 7RPZI13ufpBx6nMc9KpalGTfhMBk5jGXolAavqTuRxkk3uGWNsbGoOIrWZMgpb6F1ZLsOY5r39Ow nTv9ZkXjY6CpeWxEsdEwzi7rj93LZIfBusuLI3KASzNKzzNio59nJ6Iyoifea5E/ZM5+qazr/G/X hPX+5xlDSfizpJULB334F93oPzelAwAA