From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id E25D5391C438 for ; Mon, 7 Aug 2023 11:46:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E25D5391C438 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691408767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uS+DIje+qs7f+9oxbyCMa7w/hjz5y4oy/uPasqyTDjo=; b=EOs1UFRLWNaXmABB3UhMEL8VdFKtVAgJFKSye6NheoncVmUTU09hRyaNVhDHkBOEm783xQ KRM9kVmI5+hOY/3QABe5/la7FD8DcbvQYnLcjhgabEDfWUrW9DwqPF7caRr0/7RNUw//tW /15nsiCJl4idlAgcfhSAMgT3Dh4ZbNI= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-507-bVdKAqfgM6upYjHq2J7w1g-1; Mon, 07 Aug 2023 07:46:06 -0400 X-MC-Unique: bVdKAqfgM6upYjHq2J7w1g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 76FD41C06915; Mon, 7 Aug 2023 11:46:05 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0A6DDC15BB8; Mon, 7 Aug 2023 11:46:04 +0000 (UTC) From: Florian Weimer To: Paul Wise Cc: Libc-help Subject: Re: is this a bug in glibc or readpst? References: <2cefc4fa95dd439c2581f4f06d520c004cd33708.camel@bonedaddy.net> <875yf6nj43.fsf@oldenburg.str.redhat.com> <87ilitpv06.fsf@oldenburg.str.redhat.com> <874jlbi5x0.fsf@oldenburg.str.redhat.com> <161b0b6563925702c3fda431ae703d0aa395b60a.camel@bonedaddy.net> Date: Mon, 07 Aug 2023 13:46:03 +0200 In-Reply-To: <161b0b6563925702c3fda431ae703d0aa395b60a.camel@bonedaddy.net> (Paul Wise's message of "Mon, 07 Aug 2023 19:00:47 +0800") Message-ID: <87edkfgjno.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * Paul Wise: > On Mon, 2023-08-07 at 10:59 +0200, Florian Weimer wrote: > >> We could perhaps avoid the seek for read-only streams.=C2=A0 We are abou= t to >> close the stream anyway, so fflush does not have any useful effect >> anyway.=C2=A0 Not sure what others think if it is worth the complexity.= =C2=A0 On >> the other hand, preserving backwards compatibility here does not appear >> to be too onerous. > > It might be worth checking what other implementations do, perhaps > if they all avoid the seek in this case then maybe glibc should too? I expect this is difficult to figure out for certain because of the internal stream state may not be very clear unless you are familiar with the code. 8-( So I'd prefer to fix the glibc regression instead. Thanks, Florian