From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, PDS_RDNS_DYNAMIC_FP,RCVD_IN_DNSWL_MED,RDNS_DYNAMIC,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 2960A1F8C6 for ; Fri, 30 Jul 2021 16:20:04 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2B77D385AC25 for ; Fri, 30 Jul 2021 16:20:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2B77D385AC25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1627662003; bh=WaWCHjtnBA7qQGVNywoXqnt5x1xF0pQoeJFv4ojjo8A=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=EW7ZICKPbzAWNBwXkXPVFr5912mtQ6l2mScpbyL10Qg/6oVZldyOSDrnrBMFJ+xM6 /fvyDxekbUPR8AiuvV5cVosJU4LkcEvUhe0nlZjzW/bkHuokQbTsLaQvoxRExcGSAF SQ4Kf9k40BbmJbEoBzG5YN2XctAcM0O4qfSLvwcQ= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 8FF21385AC25 for ; Fri, 30 Jul 2021 16:19:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8FF21385AC25 Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-179-lr44cZACMWOyRqYXiU-W1Q-1; Fri, 30 Jul 2021 12:19:39 -0400 X-MC-Unique: lr44cZACMWOyRqYXiU-W1Q-1 Received: by mail-lf1-f71.google.com with SMTP id c3-20020a0565123243b0290379403f4d35so4247293lfr.12 for ; Fri, 30 Jul 2021 09:19:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WaWCHjtnBA7qQGVNywoXqnt5x1xF0pQoeJFv4ojjo8A=; b=e4OF/oNI0FTCpnUbP/+lM7fyW9K0AtGo1MHJL26pi+YFisz9GhFcPhmcFlau0IghrQ my8mXJiITqT+IFlT2eOok+jggNhWH/5Z3PPLYiHtvlof/OTToyBTCQkbEtBJXvKMEYOp 86zF0GNoyvpn49iSkf+2kC5MbCnpHgADrfLaehTcHZs5qGWCsCN6jiwKNLKC+CS7xFyQ 2WnRWPB+4ScLNRWPySoyZD2u9S13w0z81RG8M0i/GMulIdbNxs3AgQTmsp1Tr1sptBRR 2o3jaLBn+Wgb5WAL1Ol1XeeRRIqXVKrFhsIUgCDYWVxYyPsXWOCac/71I29hnpxHsJPA R1JQ== X-Gm-Message-State: AOAM530DNe3hoLvGk7TBDlNllulD6D1nKCts2alVFGRxjxqAYuoYLXbQ BYcBYMPAbquU+8S90ZKNsb6PuUk7E6862TE4+WdHGfqxOPg+qh5pzVi4a6GTu0AH/Eo5p79giZf TF2KDGeq5tCYWfeZuLv/tvkUlM2efxdYIqIEi X-Received: by 2002:a2e:9d43:: with SMTP id y3mr2183363ljj.85.1627661976594; Fri, 30 Jul 2021 09:19:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQSMdsR5fUHO2cLEif7our4bZ/Na0YXN35eizxOjN9THx4TA1sQzOM7RLZEMnF2Iqg8hoiklc9VoijE/8+gMw= X-Received: by 2002:a2e:9d43:: with SMTP id y3mr2183169ljj.85.1627661971897; Fri, 30 Jul 2021 09:19:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 30 Jul 2021 18:19:21 +0200 Message-ID: Subject: Re: Failures building glibc with mainline GCC To: Joseph Myers X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Aldy Hernandez via Libc-alpha Reply-To: Aldy Hernandez Cc: "MacLeod, Andrew" , GCC Mailing List , Martin Sebor , libc-alpha@sourceware.org Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" There's a new jump threader in GCC which is much more aggressive, and may trigger latent problems with other warning passes, especially -Warray-bounds, -Woverflow, and -Wuninitialized. Do your problems go away if you take out commit 2e96b5f14e? I have notes throughout the commit analyzing variants of the above warnings (for example my addendum to gcc.c-torture/compile/pr83510.c). So far, all the warnings I've seen are legitimate jump threading opportunities that we are now doing, but which throw off the warning passes. Before the inclusion of the new threader, I had warned that this could happen. Perhaps we'll have to come up a way to reduce the false positives. Aldy On Fri, Jul 30, 2021 at 5:31 PM Joseph Myers wrote: > > There are a lot of failures building glibc with mainline GCC right now > > (previously, there were ICEs building glibc on various architectures, so > these might be hard to bisect): > > > * x86_64-linux-gnu: "error: array subscript 0 is outside array bounds of > '__seg_fs struct pthread * __seg_fs[0]' [-Werror=array-bounds]". This is > the one discussed in > . > > In file included from ../sysdeps/generic/libc-tsd.h:44, > from ../include/../locale/localeinfo.h:224, > from ../include/ctype.h:26, > from loadmsgcat.c:29: > loadmsgcat.c: In function '_nl_load_domain': > ../sysdeps/x86_64/nptl/tls.h:185:4: error: array subscript 0 is outside array bounds of '__seg_fs struct pthread * __seg_fs[0]' [-Werror=array-bounds] > 185 | (*(struct pthread *__seg_fs *) offsetof (struct pthread, header.self)) > | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../sysdeps/nptl/libc-lock.h:92:18: note: in expansion of macro 'THREAD_SELF' > 92 | void *self = THREAD_SELF; \ > | ^~~~~~~~~~~ > loadmsgcat.c:770:3: note: in expansion of macro '__libc_lock_lock_recursive' > 770 | __libc_lock_lock_recursive (lock); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~ > > > * i686-gnu: > > hurdselect.c: In function '_hurd_select': > hurdselect.c:555:7: error: 'ss' may be used uninitialized in this function [-Werror=maybe-uninitialized] > 555 | _hurd_sigstate_unlock (ss); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~ > > As far as I can tell, this is a false positive from the compiler (this > code is only reached if (sigport != MACH_PORT_NULL), in which case ss has > been initialized). > > > * Several architectures (all of them 32-bit), powerpc-linux-gnu for > example: > > In file included from t.61.c:437: > In function 'from_t_61_single', > inlined from 'gconv' at ../iconv/skeleton.c:568:15: > ../iconv/loop.c:440:22: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] > 440 | bytebuf[inlen++] = *inptr++; > | ~~~~~~~~~~~~~~~~~^~~~~~~~~~ > ../iconv/loop.c: In function 'gconv': > ../iconv/loop.c:382:17: note: at offset 2 into destination object 'bytebuf' of size 2 > 382 | unsigned char bytebuf[MAX_NEEDED_INPUT]; > | ^~~~~~~ > > I don't know if this is a false positive or not. > > > * powerpc64-linux-gnu: > > In file included from ../sysdeps/powerpc/dl-tls.c:20: > In function '_dl_allocate_tls_init', > inlined from '_dl_allocate_tls' at ../elf/dl-tls.c:621:10: > ../elf/dl-tls.c:529:10: error: array subscript -1 is outside array bounds of 'void[9223372036854775807]' [-Werror=array-bounds] > 529 | dtv_t *dtv = GET_DTV (result); > | ^~~ > In file included from ../elf/dl-tls.c:28, > from ../sysdeps/powerpc/dl-tls.c:20: > ../sysdeps/powerpc/nptl/tls.h:136:34: error: array subscript -1 is outside array bounds of 'void[9223372036854775807]' [-Werror=array-bounds] > 136 | ((tcbhead_t *) (tcbp))[-1].dtv = dtvp + 1 > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ > ../elf/dl-tls.c:544:7: note: in expansion of macro 'INSTALL_DTV' > 544 | INSTALL_DTV (result, &dtv[-1]); > | ^~~~~~~~~~~ > > > * powerpc64le-linux-gnu: "error: '-mabi=ibmlongdouble' requires > '-mlong-double-128'". See > . > > > -- > Joseph S. Myers > joseph@codesourcery.com >