From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) by sourceware.org (Postfix) with ESMTPS id E8A1F3858297 for ; Fri, 29 Jul 2022 16:09:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E8A1F3858297 Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-31f445bd486so55565267b3.13 for ; Fri, 29 Jul 2022 09:09:31 -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=3w5Lwk5Aqe/38Q+WpqF21WcslNRrhJEymggRVy3/j3w=; b=qYD3e0nDnSpFvwYae4q0PnWRRwFJMtfH708NJ1VrUScI26fFtb+pRp6r8AI38K9rf5 c3pRskagSYPOYLC6PHJnrAB5aLHXWJBnHs53ZzWSEh+k1xDU3w0ZmPgOh0+u6G3nAnuX pnFTQfoF/24BcHL4fj4rLohzmmS7Um7wHCP8eDrO+4v6L2dCMCgkZywiR8rm7280vV8B z79/+YDq9NiZjaFdt5fc4qvYlMzEtETv06shDuW6c7021RKDLgFg/yZWUdIhljIryvyQ cU67stJyA5DJx8Fy7Le2ZPy6y6UKOjMk2otZSIXvJlYYuqPcVdw52fhi76VkrB6vPU+k ci3g== X-Gm-Message-State: ACgBeo3IuCRYS4DOxZ11l211ymAoyogf5Vm5suUCG/Kqaz4f3eHiPeqW 78ye6cyj8PrEXECR11d3jp0JAruXcKseHis/FrI= X-Google-Smtp-Source: AA6agR5HYFt7WJUQ7xBRz6NSD7tB2bqdrOewB2RcQnazuJ+sdA6wgCvcGB6tCZ87h7wfFymnMtshJNF827P5ug8jH5I= X-Received: by 2002:a81:b142:0:b0:31f:ba7c:5b56 with SMTP id p63-20020a81b142000000b0031fba7c5b56mr3658988ywh.390.1659110971250; Fri, 29 Jul 2022 09:09:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sunil Pandey Date: Fri, 29 Jul 2022 09:08:55 -0700 Message-ID: Subject: Re: glibc 2.36 build failure on Fedora 36 with gcc 12 (-Werror=use-after-free) To: "Carlos O'Donell" , tom@honermann.net Cc: libc-alpha Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.1 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 16:09:33 -0000 On Fri, Jul 29, 2022 at 8:43 AM Sunil Pandey wrote: > > 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 failure > > 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=98realloc= =E2=80=99 [-Werror=3Duse-after-free] > > 335 | map[i].alias +=3D new_pool - stri= ng_space; > > | ~~~~~~~~~^~~~~~~~= ~~~~~~ > > localealias.c:325:49: note: call to =E2=80=98realloc=E2=80=99 here > > 325 | char *new_pool =3D (char *) realloc (stri= ng_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.