[go] cmd/link: don't let dsymutil delete our temp directory

9 views
Skip to first unread message

Cherry Mui (Gerrit)

unread,
Jun 21, 2024, 12:02:22 PM (12 days ago) Jun 21
to goph...@pubsubhelper.golang.org, Than McIntosh, Go LUCI, golang-co...@googlegroups.com
Attention needed from Than McIntosh

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Than McIntosh
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: I18759cc39512819bbd0511793ce917eae72245d6
Gerrit-Change-Number: 593659
Gerrit-PatchSet: 1
Gerrit-Owner: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Than McIntosh <th...@google.com>
Gerrit-Attention: Than McIntosh <th...@google.com>
Gerrit-Comment-Date: Fri, 21 Jun 2024 16:02:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

Than McIntosh (Gerrit)

unread,
Jun 24, 2024, 7:19:37 AM (10 days ago) Jun 24
to Cherry Mui, goph...@pubsubhelper.golang.org, Than McIntosh, Go LUCI, golang-co...@googlegroups.com
Attention needed from Cherry Mui

Than McIntosh voted and added 1 comment

Votes added by Than McIntosh

Code-Review+2

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Than McIntosh . resolved

Xcode whee...

Open in Gerrit

Related details

Attention is currently required from:
  • Cherry Mui
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement 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: I18759cc39512819bbd0511793ce917eae72245d6
Gerrit-Change-Number: 593659
Gerrit-PatchSet: 1
Gerrit-Owner: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Than McIntosh <th...@google.com>
Gerrit-Attention: Cherry Mui <cher...@google.com>
Gerrit-Comment-Date: Mon, 24 Jun 2024 11:19:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Cherry Mui (Gerrit)

unread,
Jun 26, 2024, 12:17:30 PM (7 days ago) Jun 26
to goph...@pubsubhelper.golang.org, Than McIntosh, Go LUCI, golang-co...@googlegroups.com

Cherry Mui added 1 comment

Patchset-level comments
Cherry Mui . resolved

Thanks.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement 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: I18759cc39512819bbd0511793ce917eae72245d6
Gerrit-Change-Number: 593659
Gerrit-PatchSet: 1
Gerrit-Owner: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Than McIntosh <th...@google.com>
Gerrit-Comment-Date: Wed, 26 Jun 2024 16:17:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
open
diffy

Cherry Mui (Gerrit)

unread,
Jun 26, 2024, 12:17:33 PM (7 days ago) Jun 26
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Than McIntosh, Go LUCI, golang-co...@googlegroups.com

Cherry Mui submitted the change

Change information

Commit message:
cmd/link: don't let dsymutil delete our temp directory

To work around #59026, where dsymutil may not clean up its temp
directory at exit, we set DSYMUTIL_REPRODUCER_PATH to our temp
directory so it uses that, and we can delete it at the end.

In Xcode 16 beta, dsymutil deletes the DSYMUTIL_REPRODUCER_PATH
directory even if it is not empty. We still need our tmpdir at the
point, so give a subdirectory to dsymutil instead.

For #68088.
Change-Id: I18759cc39512819bbd0511793ce917eae72245d6
Reviewed-by: Than McIntosh <th...@google.com>
Files:
  • M src/cmd/link/internal/ld/lib.go
Change size: S
Delta: 1 file changed, 9 insertions(+), 1 deletion(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Than McIntosh
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I18759cc39512819bbd0511793ce917eae72245d6
Gerrit-Change-Number: 593659
Gerrit-PatchSet: 2
open
diffy
satisfied_requirement

Cherry Mui (Gerrit)

unread,
11:20 AM (10 hours ago) 11:20 AM
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Cherry Mui has uploaded the change for review

Commit message

[release-branch.go1.22] cmd/link: don't let dsymutil delete our temp directory


To work around #59026, where dsymutil may not clean up its temp
directory at exit, we set DSYMUTIL_REPRODUCER_PATH to our temp
directory so it uses that, and we can delete it at the end.

In Xcode 16 beta, dsymutil deletes the DSYMUTIL_REPRODUCER_PATH
directory even if it is not empty. We still need our tmpdir at the
point, so give a subdirectory to dsymutil instead.

Updates #68088.
Fixes #68198.


Change-Id: I18759cc39512819bbd0511793ce917eae72245d6
Reviewed-on: https://go-review.googlesource.com/c/go/+/593659
Reviewed-by: Than McIntosh <th...@google.com>
LUCI-TryBot-Result: Go LUCI <golang...@luci-project-accounts.iam.gserviceaccount.com>
(cherry picked from commit 5f319b75075a62ab176ab8c25f0e45f2ae4f0704)

Change diff

diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
index eab74dc..4ad9cdb 100644
--- a/src/cmd/link/internal/ld/lib.go
+++ b/src/cmd/link/internal/ld/lib.go
@@ -1954,7 +1954,15 @@
cmd := exec.Command(dsymutilCmd, "-f", *flagOutfile, "-o", dsym)
// dsymutil may not clean up its temp directory at exit.
// Set DSYMUTIL_REPRODUCER_PATH to work around. see issue 59026.
- cmd.Env = append(os.Environ(), "DSYMUTIL_REPRODUCER_PATH="+*flagTmpdir)
+ // dsymutil (Apple LLVM version 16.0.0) deletes the directory
+ // even if it is not empty. We still need our tmpdir, so give a
+ // subdirectory to dsymutil.
+ dsymDir := filepath.Join(*flagTmpdir, "dsymutil")
+ err := os.MkdirAll(dsymDir, 0777)
+ if err != nil {
+ Exitf("fail to create temp dir: %v", err)
+ }
+ cmd.Env = append(os.Environ(), "DSYMUTIL_REPRODUCER_PATH="+dsymDir)
if ctxt.Debugvlog != 0 {
ctxt.Logf("host link dsymutil:")
for _, v := range cmd.Args {

Change information

Files:
  • M src/cmd/link/internal/ld/lib.go
Change size: S
Delta: 1 file changed, 9 insertions(+), 1 deletion(-)

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: release-branch.go1.22
Gerrit-Change-Id: I18759cc39512819bbd0511793ce917eae72245d6
Gerrit-Change-Number: 596455
unsatisfied_requirement
satisfied_requirement
open
diffy

Cherry Mui (Gerrit)

unread,
11:20 AM (10 hours ago) 11:20 AM
to goph...@pubsubhelper.golang.org, Than McIntosh, golang-co...@googlegroups.com
Attention needed from Than McIntosh

Cherry Mui voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Than McIntosh
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: release-branch.go1.22
Gerrit-Change-Id: I18759cc39512819bbd0511793ce917eae72245d6
Gerrit-Change-Number: 596455
Gerrit-PatchSet: 1
Gerrit-Owner: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Than McIntosh <th...@google.com>
Gerrit-Attention: Than McIntosh <th...@google.com>
Gerrit-Comment-Date: Wed, 03 Jul 2024 15:20:31 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Cherry Mui (Gerrit)

unread,
11:24 AM (10 hours ago) 11:24 AM
to goph...@pubsubhelper.golang.org, Go LUCI, Than McIntosh, golang-co...@googlegroups.com
Attention needed from Than McIntosh

Cherry Mui voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Than McIntosh
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: release-branch.go1.22
Gerrit-Change-Id: I18759cc39512819bbd0511793ce917eae72245d6
Gerrit-Change-Number: 596455
Gerrit-PatchSet: 2
Gerrit-Owner: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Than McIntosh <th...@google.com>
Gerrit-Attention: Than McIntosh <th...@google.com>
Gerrit-Comment-Date: Wed, 03 Jul 2024 15:24:19 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Than McIntosh (Gerrit)

unread,
1:26 PM (8 hours ago) 1:26 PM
to Cherry Mui, goph...@pubsubhelper.golang.org, Than McIntosh, Go LUCI, golang-co...@googlegroups.com
Attention needed from Cherry Mui

Than McIntosh voted Code-Review+2

Code-Review+2
Open in Gerrit

Related details

Attention is currently required from:
  • Cherry Mui
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement 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: release-branch.go1.22
Gerrit-Change-Id: I18759cc39512819bbd0511793ce917eae72245d6
Gerrit-Change-Number: 596455
Gerrit-PatchSet: 2
Gerrit-Owner: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Than McIntosh <th...@google.com>
Gerrit-Attention: Cherry Mui <cher...@google.com>
Gerrit-Comment-Date: Wed, 03 Jul 2024 17:26:18 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages