From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8056 invoked by alias); 16 Jan 2014 17:24:31 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 8022 invoked by uid 48); 16 Jan 2014 17:24:27 -0000 From: "law at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/58602] .gcno files not truncated at gcov_close Date: Thu, 16 Jan 2014 17:24:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: law at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-01/txt/msg01727.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58602 Jeffrey A. Law changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at redhat dot com --- Comment #7 from Jeffrey A. Law --- It seems like all we've done in the last 10 years is rotate through a set of bugs in this code. The whole point of the Richard's original removal of ftruncate was to make things easier for folks on windows & using simulators (newlib). That patch introduced a race which led to Jakub's change form Feb 2004 to close the race condition, but which can leave the file untruncated. So the question is does this introduce a race similar to what Jakub was trying to fix back in Feb 2004? What testing has been done to see if there's a race. Testing similar to Jakub's but scaled up for modern hardware would raise the confidence level of this patch significantly. http://marc.info/?l=gcc-patches&m=107747608611324&w=2 [ Oddly enough, the gcc.gnu.org archives seem to be missing for this thread and much of Feb2004. ]