From nobody Tue Jan 25 15:26:23 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2EF091980DAB for ; Tue, 25 Jan 2022 15:26:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JjrKr4ybjz3KRd for ; Tue, 25 Jan 2022 15:26:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B7934298 for ; Tue, 25 Jan 2022 15:26:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 20PFQOPR010602 for ; Tue, 25 Jan 2022 15:26:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 20PFQO1L010601 for bugs@FreeBSD.org; Tue, 25 Jan 2022 15:26:24 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 76398] [libc] stdio can lose data in the presence of signals Date: Tue, 25 Jan 2022 15:26:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 6.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643124385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/8Z6Etud1vpU6EVaj5Q3E8CTN1ilZ9pXVKpcKxqeg5Y=; b=twgs2L60CLAm0nLfWLTp1ZumWZ7Y6AWVBJW7GPnwd6TyLBOSZCtT1UkgS2OzXhgQHSj/UJ 33u0nZND3PfDfq24ZgXh8NsVuW6Ty6+e7hM5AcWyI14sSwwzsfr3eTNCMFzWe3zfKe+PIU 42xoeu2UE2dL191rXvU9baVyeBQ9PIhsmjvLw9k3cALJ8Z3xmj4eUoGiqsovEYwIvLVM1i dj3dgQKiKM2BAZxdUrRfTBab7Lwo/2gY/YOCIDOYQAW8PTy6Eomt69UIAj7ZP4TzNx33us gRT572uyLWy0OSi8PINPA2FlqNiRcWWzLnRBIBzK/E+6MgTaLORKaYi5p2lJxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643124385; a=rsa-sha256; cv=none; b=U5DBnoZlmXi66enl2f/hJ0OfjM3vHeQkS7wJsSXfocDDyLcn4T8cfI4xjfNr4/N26Qs5bx UggvTnB7BC46TS5govjGEhb9ttKzBSxUjlcoXn5jv8D2IqV2xOf/vc1ECncR9WTrhMBgLW uYhn1b/F90kin5Joo4+kdCGh1kkhE1d1nYgHZ6HNHnH3tLJhvuzId/gO8Y763ijBRyflWQ hbl1rQc9YZeSDfvzErL9uhEnzFDNoZ0TkqKAM2mXGTtK5gubexmzvmPiLHtVpXhraGg1yr Tmr1IA/AtulsGT2haOEcc6xTTv29yISQnZZdLLEY8FWUXRMACfo+2u5FlJrFbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D76398 --- Comment #6 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D86a16ada1ea608408cec370171d9f5935= 3e97c77 commit 86a16ada1ea608408cec370171d9f59353e97c77 Author: Konstantin Belousov AuthorDate: 2022-01-23 06:52:59 +0000 Commit: Konstantin Belousov CommitDate: 2022-01-25 15:26:05 +0000 __sflush(): on write error, if nothing was written, reset FILE state ba= ck otherwise the data is just dropped. Check for current position equal to the buffer base at the entry of the function; if not equal, setvbuf() was done from the write method and it is not our business to override the decision. PR: 76398 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34007 lib/libc/stdio/fflush.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=