From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BCCAC3858D1E; Tue, 16 Jan 2024 01:39:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BCCAC3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1705369166; bh=oTrKJt8h3SDadb259f5SLVUzisD5d8jEG2okr4RHIdI=; h=From:To:Subject:Date:From; b=qKuRDV6k+eJhRlcoC5GLJVY+bQujL3+Sy/1U/iZL70CzEgq8j4gLoju6czme5DVtN JBM6p63CqoWjvAuVpT2hJMgDz7XW2xtiwo9BWbafk5qHaYXl8LfVNGUdzMv3HhLv8O XmrjCCpKbhyuB49Ahdt0NX4IzQD6CXh1NPiFFVdY= From: "fche at redhat dot com" To: elfutils-devel@sourceware.org Subject: [Bug debuginfod/31248] New: debuginfod_find_* may return fd with file-offset at end Date: Tue, 16 Jan 2024 01:39:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: debuginfod X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fche at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31248 Bug ID: 31248 Summary: debuginfod_find_* may return fd with file-offset at end Product: elfutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: debuginfod Assignee: unassigned at sourceware dot org Reporter: fche at redhat dot com CC: elfutils-devel at sourceware dot org Target Milestone: --- During the srcfiles test case diagnosis, studying the reason for occasional 0-length files, found something funky about the debuginfod_find_FOO api. It appears possible for first-time-downloaded files to result in FDs that w= ere freshly written into by curl, with the file offset positioned right at the = end. We should lseek(2) to the front. Clients would expect to be able to read = it, as opposed to an insta-EOF. --=20 You are receiving this mail because: You are on the CC list for the bug.=