From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by sourceware.org (Postfix) with ESMTPS id 0249A384D1A2 for ; Fri, 29 Jul 2022 18:07:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0249A384D1A2 Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-31d85f82f0bso58810387b3.7 for ; Fri, 29 Jul 2022 11:07:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=nAS1qOZ+yd4XjBNFgsKNFc7fBG5o9UoRxsnwHIdFw/I=; b=2BP1v3XU8m0GmeRcMYzi+07BN7bb9w8hw1CvCiHacvK9D1LR28jSftVgLxk16GGODc wnsCD//SvymRhJAzLjJoeSPA80Q/dAtkTQoV93NGp/i3pZj7ORPTDnfBOR2v3d6mmBkn nn1e4NFPikVnweO3zzALUVMORh+qhDxSSVt/kPmn3ayBAW3pTjV3S3BIDq+MMKS+0RF1 VcUjk/BgUbQjPX2e754Rtx8w1gc9mQytUT06oY+OqCvb6KZm81N/6a5OxfOi5SngHHsE T0xSd6gQ0faQNXkk/oBIoNVmWw2p6ozIUu4PDewzjhy29T62PJ9QPdfxL/MmSp9STn/K mlhg== X-Gm-Message-State: ACgBeo0JOxlzA9/OktekdMV7trUehWOQnAOVL4xdqDCiC+LSXpa3/p7d WPeCL2xGN+XVfY6PEMIYbvn/ZdHurixGCS5To08= X-Google-Smtp-Source: AA6agR5kje/YDQ7MpnC9erm5rYAbCA+iCoIZ8Sf1rf4MYVMmcgdQUHDg/oLArnTwEQOqEubVv9FUcJMqxQitCyDUAYs= X-Received: by 2002:a81:5486:0:b0:31c:b029:1d24 with SMTP id i128-20020a815486000000b0031cb0291d24mr4154889ywb.56.1659118076455; Fri, 29 Jul 2022 11:07:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sunil Pandey Date: Fri, 29 Jul 2022 11:07:20 -0700 Message-ID: Subject: Re: glibc 2.36 build failure on Fedora 36 with gcc 12 (-Werror=use-after-free) To: "H.J. Lu" Cc: "Carlos O'Donell" , Tom Honermann , libc-alpha Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HK_RANDOM_ENVFROM, HK_RANDOM_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: , X-List-Received-Date: Fri, 29 Jul 2022 18:07:58 -0000 On Fri, Jul 29, 2022 at 10:52 AM H.J. Lu wrote: > > On Fri, Jul 29, 2022 at 10:47 AM Sunil Pandey wrote: > > > > On Fri, Jul 29, 2022 at 9:08 AM Sunil Pandey wrote: > > > > > > On Fri, Jul 29, 2022 at 8:43 AM Sunil Pandey wrot= e: > > > > > > > > On Fri, Jul 29, 2022 at 8:26 AM Carlos O'Donell via Libc-alpha > > > > wrote: > > > > > > > > > > Just posting here for the record that I see a glibc 2.36 build fa= ilure > > > > > with Fedora 36 and gcc 12. > > > > > > > > > > localealias.c: In function =E2=80=98read_alias_file=E2=80=99: > > > > > localealias.c:335:56: error: pointer may be used after =E2=80=98r= ealloc=E2=80=99 [-Werror=3Duse-after-free] > > > > > 335 | map[i].alias +=3D new_pool = - string_space; > > > > > | ~~~~~~~~~^~= ~~~~~~~~~~~~ > > > > > localealias.c:325:49: note: call to =E2=80=98realloc=E2=80=99 her= e > > > > > 325 | char *new_pool =3D (char *) realloc= (string_space, new_size); > > > > > | ^~~~~~~~~= ~~~~~~~~~~~~~~~~~~~~~~~ > > > > > cc1: all warnings being treated as errors > > > > > > > > > > I'm going to review this quickly before we make the glibc release= . > > > > > > > > > > -- > > > > > Cheers, > > > > > Carlos. > > > > > > > > > > > > > I am getting these 2 wide string test failures on my SKX server. > > > > > > > > FAIL: wcsmbs/test-c8rtomb (Not reproducible) > > > > > > > > FAIL: wcsmbs/test-mbrtoc8 > > > > > > > > $ wcsmbs/test-mbrtoc8 > > > > test-mbrtoc8.c:477: numeric comparison failure > > > > left: 2 (0x2); from: mbrtoc8 (buf, mbs, 1, &s) > > > > right: 1 (0x1); from: (size_t) 1 > > > > test-mbrtoc8.c:479: numeric comparison failure > > > > left: 0 (0x0); from: buf[0] > > > > right: 195 (0xc3); from: 0xC3 > > > > test-mbrtoc8.c:481: numeric comparison failure > > > > left: 204 (0xcc); from: buf[0] > > > > right: 138 (0x8a); from: 0x8A > > > > test-mbrtoc8.c:483: numeric comparison failure > > > > left: 132 (0x84); from: buf[0] > > > > right: 204 (0xcc); from: 0xCC > > > > test-mbrtoc8.c:484: numeric comparison failure > > > > left: 0 (0x0); from: mbrtoc8 (buf, mbs, 1, &s) > > > > right: 18446744073709551613 (0xfffffffffffffffd); from: (size_t) = -3 > > > > test-mbrtoc8.c:485: numeric comparison failure > > > > left: 0 (0x0); from: buf[0] > > > > right: 132 (0x84); from: 0x84 > > > > test-mbrtoc8.c:516: numeric comparison failure > > > > left: 2 (0x2); from: mbrtoc8 (buf, mbs, 1, &s) > > > > right: 1 (0x1); from: (size_t) 1 > > > > test-mbrtoc8.c:518: numeric comparison failure > > > > left: 0 (0x0); from: buf[0] > > > > right: 195 (0xc3); from: 0xC3 > > > > test-mbrtoc8.c:520: numeric comparison failure > > > > left: 204 (0xcc); from: buf[0] > > > > right: 170 (0xaa); from: 0xAA > > > > test-mbrtoc8.c:522: numeric comparison failure > > > > left: 140 (0x8c); from: buf[0] > > > > right: 204 (0xcc); from: 0xCC > > > > test-mbrtoc8.c:523: numeric comparison failure > > > > left: 0 (0x0); from: mbrtoc8 (buf, mbs, 1, &s) > > > > right: 18446744073709551613 (0xfffffffffffffffd); from: (size_t) = -3 > > > > test-mbrtoc8.c:524: numeric comparison failure > > > > left: 0 (0x0); from: buf[0] > > > > right: 140 (0x8c); from: 0x8C > > > > error: 12 test failures > > > > > > These 2 tests fail on their first commit itself, unless this issue > > > is specific to my machine. > > > > > > commit f4fe72a4f7b22588a7c902e39ddd3dcd244bbf9f (HEAD) > > > Author: Tom Honermann > > > Date: Thu Jun 30 08:52:15 2022 -0400 > > > > > > stdlib: Tests for mbrtoc8, c8rtomb, and the char8_t typedef. > > > > Steps to reproduce: > > > > make glibc > > make check subdirs=3Dwcsmbs -j40 > > This patch should fix it: > > https://sourceware.org/pipermail/libc-alpha/2022-July/141144.html > > -- > H.J. It fixes the issue. --Sunil