Skip to content

define err in go func instead of use err defined in outer scope#13033

Merged
williammartin merged 1 commit intocli:trunkfrom
Lslightly:13001-fix-err-data-race-and-heap-alloc
Mar 25, 2026
Merged

define err in go func instead of use err defined in outer scope#13033
williammartin merged 1 commit intocli:trunkfrom
Lslightly:13001-fix-err-data-race-and-heap-alloc

Conversation

@Lslightly
Copy link
Copy Markdown
Contributor

Two benefits:

  1. make err allocated in stack
  2. avoid err data race

Fixes #13001

@Lslightly Lslightly requested a review from a team as a code owner March 25, 2026 16:33
Copy link
Copy Markdown
Member

@williammartin williammartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@williammartin williammartin enabled auto-merge March 25, 2026 17:00
@github-actions github-actions bot added external pull request originating outside of the CLI core team needs-triage needs to be reviewed unmet-requirements and removed needs-triage needs to be reviewed labels Mar 25, 2026
@github-actions
Copy link
Copy Markdown

Thanks for your pull request! Unfortunately, it doesn't meet the minimum requirements for review:

  • None of the referenced issues have the help wanted label

Please update your PR to address the above. Requirements:

  1. Include a detailed description of what this PR does
  2. Link to an issue with the help wanted label (use Fixes #123 or Closes #123 if it resolves the issue)

This PR will be automatically closed in 7 days if these requirements are not met.

@williammartin williammartin disabled auto-merge March 25, 2026 17:13
@williammartin
Copy link
Copy Markdown
Member

Bypassing merge because I don't think codespaces need to review.

@williammartin williammartin merged commit 9b4a989 into cli:trunk Mar 25, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team unmet-requirements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

data race possibility for err variable and err is allocated in heap

2 participants