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: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 1E3421F461 for ; Thu, 20 Jun 2019 17:42:40 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=GfOS eEapod0YZK4nNIfgxosb2qAi1AtA78reMPwadJJavSrcJ+IlC4/MYWhUVG+wLmHs J60Sx43qxyuQo6nYrgQ62XI+e/JlNBz3k+TDEAoM8lhmUjQ97PqOZccY8nuD3oXI 0nJhMCZBY1nspNf8h/2fljlW44avpKHewb3detA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=eRTXNDQfRT fDKaFKFmgYBu2V+ZE=; b=U/pZk4GdcH5E6lj9+wq+g44QcmUT7DN4mVJdXLHgfJ hasu+IgS+tnpFVJM+3xFUr3ZpajUrU6yCmw9LWiGydkpLWciIlCvTO/rMpH9D4xB pfxsHvdN3GrA3JbQLWY/ft3pDG8VQQkWkPfwfdXxg5NTwav4IeBwNtokX7Ko9Trf 8= Received: (qmail 121872 invoked by alias); 20 Jun 2019 17:42:37 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 121864 invoked by uid 89); 20 Jun 2019 17:42:37 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: vmicros1.altlinux.org Date: Thu, 20 Jun 2019 20:42:33 +0300 From: "Dmitry V. Levin" To: libc-alpha@sourceware.org Subject: Re: [PATCH v5] libio: do not attempt to free wide buffers of legacy streams [BZ #24228] Message-ID: <20190620174232.GA10097@altlinux.org> References: <20190219012913.GB29070@altlinux.org> <87lfxx4t6x.fsf@oldenburg2.str.redhat.com> <20190619160340.GA23394@altlinux.org> <87blyt362d.fsf@oldenburg2.str.redhat.com> <20190619174649.GB25165@altlinux.org> <878stxo0qc.fsf@mid.deneb.enyo.de> <20190619195130.GA27256@altlinux.org> <87y31x1dl3.fsf@oldenburg2.str.redhat.com> <20190619220834.GA28646@altlinux.org> <87imt01vkf.fsf@oldenburg2.str.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline In-Reply-To: <87imt01vkf.fsf@oldenburg2.str.redhat.com> --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 20, 2019 at 10:59:28AM +0200, Florian Weimer wrote: > * Dmitry V. Levin: >=20 > > Commit a601b74d31ca086de38441d316a3dee24c866305 aka glibc-2.23~693 > > ("In preparation for fixing BZ#16734, fix failure in misc/tst-error1-mem > > when _G_HAVE_MMAP is turned off.") introduced a regression: > > _IO_unbuffer_all now invokes _IO_wsetb to free wide buffers of all > > files, including legacy standard files which are small statically > > allocated objects that do not have wide buffers and the _mode member, > > causing memory corruption. > > > > Another memory corruption in _IO_unbuffer_all happens when -1 > > is assigned to the _mode member of legacy standard files that > > do not have it. > > > > [BZ #24228] > > * libio/genops.c (_IO_unbuffer_all) > > [SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)]: Do not attempt to free wide > > buffers and access _IO_FILE_complete members of legacy libio streams. > > * libio/tst-bz24228.c: New file. > > * libio/tst-bz24228.map: Likewise. > > * libio/Makefile [build-shared] (tests): Add tst-bz24228. > > [build-shared] (generated): Add tst-bz24228.mtrace and > > tst-bz24228.check. > > [run-built-tests && build-shared] (tests-special): Add > > $(objpfx)tst-bz24228-mem.out. > > (LDFLAGS-tst-bz24228, tst-bz24228-ENV): New variables. > > ($(objpfx)tst-bz24228-mem.out): New rule. >=20 > This version looks fine to me. Thanks. Pushed. Thanks. --=20 ldv --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJdC8WIAAoJEAVFT+BVnCUIZmAP/0o60YCm06wsTQp+yG7w4eSP 7CpOp0HNFBp5wr7xwNl6QWd+/yXkmgl2Uws7E3eZksKjKy5uf4S0Vu1/AlOUxS5K T7J/AglMJ2NoFafeN6nbjUlo1jVkTT+PKiCyM8AQc3/XgWzxxCzMr99E6q70TT5M 84eezwhDHL+fyklQThZNlkF4eMpPXVaw769ITfKUBh5dr4EJBXaVRwfFM5beGzfV M4LXF/ABwLO/9uFGiE4xHY+w/1YWcWzp1ow1cdOVNJUY1q6zfcGMxn3VZMyLjrjj 9REGQuEMZ75sZZqmb0KcZ3bV5evM2oCHEyYeAGcVDzbJR/BqqiDq4+cOsc53p7f8 KhddO7oiiEuVnAriWHYsgYAriYSptPKP3guLqLnDTreQ87EVPLJCrh0Q06VawYv8 woko1g+Y3nNVjY3gcnUqchf4P2YoSq1vTEtOCh4BH00Di4ZAlLh25YI7GrZWE4vO LH8yrQicluur4D4apGb8F4gsOVbxcpMvwHRRN6RTZ/HfkBRxFxwq0N0B3XPA/Qqk VB1wsgM1b8z3rF98H+HTC4G4kDYQDEmqrTCbymRMLXjYEmeJ9k5L6KaROuCxDPJH UVFNoGR0Z87zBpI5onRBTdIMMryqPHo6wRyEcDjPAusBrKUQTz5ncFhAUtovEMe4 OZ8JVIO1xIXGwhbuiSMA =eIpw -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn--