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 518F83850237 for ; Fri, 29 Jul 2022 17:47:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 518F83850237 Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-32269d60830so58551857b3.2 for ; Fri, 29 Jul 2022 10:47:11 -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=Go3SD/l//8LqZ26X40dFsglEYWsS5wecmjmqruyGaiE=; b=wd2ppi6fDTPZev8d2h91mpFrk8NshPtgx7rE9xdDW0qa7Qq/Dg/cZa4kklUFq7xQZv KmpCOuElbu/7ILmgyWHfmzRVuLgP5A5gb56PQ/zuHlVKd8zO6aR2Dgs+x0Fswpxq0DhI SlUlQxn9IFy1dTtm+Syp7blJiOE4DYDNziPv3doF2WIff9psu6sneZcozk7Ng2nr8LPI 3EXFCGNcW0yDcbEk/+2rFIeA9Q9tynSKbU7FaimDJddOJOftGBzIKLQKTHjy2vNCkMES M1jZ+pyAtjQ2Sn8O7F7p+8TOjrP7yWrXl0WXMUg/K+LrqV2Cc91LLJpslyDRX2e5UBWg PIZA== X-Gm-Message-State: ACgBeo1clYCx8Vryi+qcOofE1R3f4wuXkKo1+OPUITJxqZGNv1hxzZ3s ZXAisHfM45cO00fMElbyQrij9arQL8cOs8nWJr8= X-Google-Smtp-Source: AA6agR57699IcLdJlYZqfoIVY02abl6/9Hj4/ecm7B2/3mbajDXW0TRszSlut8HZgjBKORMdUECL5Sv+a8DPOU69RZE= X-Received: by 2002:a81:450a:0:b0:322:4543:75cd with SMTP id s10-20020a81450a000000b00322454375cdmr4206895ywa.120.1659116830667; Fri, 29 Jul 2022 10:47:10 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sunil Pandey Date: Fri, 29 Jul 2022 10:46:34 -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, Hongjiu Lu Cc: 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 17:47:12 -0000 On Fri, Jul 29, 2022 at 9:08 AM Sunil Pandey wrote: > > 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 failur= e > > > 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=98reall= oc=E2=80=99 [-Werror=3Duse-after-free] > > > 335 | map[i].alias +=3D new_pool - st= ring_space; > > > | ~~~~~~~~~^~~~~~= ~~~~~~~~ > > > localealias.c:325:49: note: call to =E2=80=98realloc=E2=80=99 here > > > 325 | char *new_pool =3D (char *) realloc (st= ring_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