[go] debug: close binary files

6 views
Skip to first unread message

Nikita Pivkin (Gerrit)

unread,
May 22, 2024, 6:51:26 AM5/22/24
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Nikita Pivkin has uploaded the change for review

Commit message

debug: close binary files
Change-Id: Ie9ce15f3d60377d643893725083da7ddb6ef85d0

Change diff

diff --git a/src/debug/macho/file.go b/src/debug/macho/file.go
index 7b11bb2..e226799 100644
--- a/src/debug/macho/file.go
+++ b/src/debug/macho/file.go
@@ -634,6 +634,7 @@
return nil, err
}
if _, err := io.ReadFull(r, dbuf); err != nil {
+ r.Close()
return nil, err
}
if err := r.Close(); err != nil {
diff --git a/src/debug/pe/file.go b/src/debug/pe/file.go
index ed63a11..1bea9ea 100644
--- a/src/debug/pe/file.go
+++ b/src/debug/pe/file.go
@@ -243,6 +243,7 @@
return nil, err
}
if _, err := io.ReadFull(r, dbuf); err != nil {
+ r.Close()
return nil, err
}
if err := r.Close(); err != nil {

Change information

Files:
  • M src/debug/macho/file.go
  • M src/debug/pe/file.go
Change size: XS
Delta: 2 files changed, 2 insertions(+), 0 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ie9ce15f3d60377d643893725083da7ddb6ef85d0
Gerrit-Change-Number: 587276
Gerrit-PatchSet: 1
Gerrit-Owner: Nikita Pivkin <nikita...@smartforce.io>
unsatisfied_requirement
satisfied_requirement
open
diffy

Gopher Robot (Gerrit)

unread,
May 22, 2024, 6:53:47 AM5/22/24
to Nikita Pivkin, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Message from Gopher Robot

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
A maintainer will review your change and provide feedback. See
https://go.dev/doc/contribute#review for more info and tips to get your
patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11 or adds a tag like "wait-release", it means that this CL will be
reviewed as part of the next development cycle. See https://go.dev/s/release
for more details.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ie9ce15f3d60377d643893725083da7ddb6ef85d0
Gerrit-Change-Number: 587276
Gerrit-PatchSet: 1
Gerrit-Owner: Nikita Pivkin <nikita...@smartforce.io>
Gerrit-CC: Gopher Robot <go...@golang.org>
Gerrit-Comment-Date: Wed, 22 May 2024 10:53:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

Ian Lance Taylor (Gerrit)

unread,
May 22, 2024, 9:13:53 PM5/22/24
to Nikita Pivkin, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Alex Brainman, Gopher Robot, golang-co...@googlegroups.com
Attention needed from Alex Brainman and Nikita Pivkin

Ian Lance Taylor voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Alex Brainman
  • Nikita Pivkin
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ie9ce15f3d60377d643893725083da7ddb6ef85d0
Gerrit-Change-Number: 587276
Gerrit-PatchSet: 1
Gerrit-Owner: Nikita Pivkin <nikita...@smartforce.io>
Gerrit-Reviewer: Alex Brainman <alex.b...@gmail.com>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-CC: Gopher Robot <go...@golang.org>
Gerrit-Attention: Alex Brainman <alex.b...@gmail.com>
Gerrit-Attention: Nikita Pivkin <nikita...@smartforce.io>
Gerrit-Comment-Date: Thu, 23 May 2024 01:13:47 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Ian Lance Taylor (Gerrit)

unread,
May 22, 2024, 11:01:57 PM5/22/24
to Nikita Pivkin, goph...@pubsubhelper.golang.org, Go LUCI, Ian Lance Taylor, Alex Brainman, Gopher Robot, golang-co...@googlegroups.com
Attention needed from Alex Brainman and Nikita Pivkin

Ian Lance Taylor added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Ian Lance Taylor . resolved

Thanks, but I don't think this is worth doing. The Close method is documented as not closing the underlying Reader. The only purpose of closing a zlib Reader is to check for decompression errors. Since this code isn't checking the error result, there is no reason to call Close.

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Brainman
  • Nikita Pivkin
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ie9ce15f3d60377d643893725083da7ddb6ef85d0
    Gerrit-Change-Number: 587276
    Gerrit-PatchSet: 1
    Gerrit-Owner: Nikita Pivkin <nikita...@smartforce.io>
    Gerrit-Reviewer: Alex Brainman <alex.b...@gmail.com>
    Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Attention: Alex Brainman <alex.b...@gmail.com>
    Gerrit-Attention: Nikita Pivkin <nikita...@smartforce.io>
    Gerrit-Comment-Date: Thu, 23 May 2024 03:01:51 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Sean Liao (Gerrit)

    unread,
    6:12 PM (5 hours ago) 6:12 PM
    to Nikita Pivkin, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Ian Lance Taylor, Alex Brainman, Gopher Robot, golang-co...@googlegroups.com

    Sean Liao abandoned this change.

    View Change

    Abandoned

    Sean Liao abandoned this change

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: abandon
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ie9ce15f3d60377d643893725083da7ddb6ef85d0
    Gerrit-Change-Number: 587276
    Gerrit-PatchSet: 1
    Gerrit-Owner: Nikita Pivkin <nikita...@smartforce.io>
    Gerrit-Reviewer: Alex Brainman <alex.b...@gmail.com>
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages