Skip to content

Fix batch of minor bugs#40197

Merged
chemwolf6922 merged 45 commits intomasterfrom
user/chemwolf6922/bug-hunting
Apr 22, 2026
Merged

Fix batch of minor bugs#40197
chemwolf6922 merged 45 commits intomasterfrom
user/chemwolf6922/bug-hunting

Conversation

@chemwolf6922
Copy link
Copy Markdown
Contributor

Summary of the Pull Request

This PR fixes a batch of minor bugs / issues found during code review.

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Copilot AI review requested due to automatic review settings April 17, 2026 08:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 33 out of 33 changed files in this pull request and generated 1 comment.

Comment thread src/shared/configfile/configfile.cpp Outdated
benhillis pushed a commit that referenced this pull request Apr 17, 2026
Bugs fixed (not covered by PR #40197):
- unittests.c: Fix get_addr_info test entry pointing to wrong handler
  (GetSetIdTestEntry -> GetAddrInfoTestEntry)
- SocketChannel.h: Fix %s format specifier in fmt-style LOG_ERROR on
  Linux; channel name was silently dropped from protocol error logs
- p9file.cpp: Fix readlinkat return type (int -> ssize_t) to match
  POSIX specification
- configfile.cpp: Guard ungetwc() call against WEOF to avoid undefined
  behavior on some implementations
- init.cpp: Fix SIGCHLD race by blocking the signal before setting the
  handler, preventing a window where child exit could be lost
- util.cpp: Extract duplicated signal skip list into SkipSignal() helper
  to ensure consistency between save and set handlers

Test improvements:
- NetworkTests.cpp: Add SO_RCVTIMEO timeout on accept() to prevent
  indefinite test hangs (resolves TODO)
- DrvFsTests.cpp: Add LOG_IF_WIN32_BOOL_FALSE to cleanup operations
  to surface silent file/directory deletion failures

Script hardening:
- copy_and_build_tests.ps1: Replace Invoke-Expression with call operator
  to prevent command injection via interpolated variables
- test-setup.ps1: Pass PostInstallCommand through bash -c for proper
  shell argument handling
- deploy-to-vm.ps1: Prompt for password via Read-Host -AsSecureString
  when not provided, instead of creating empty SecureString

Resource management:
- WslConfigService.cs: Dispose FileSystemWatcher in destructor to
  prevent resource leak

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
benhillis pushed a commit that referenced this pull request Apr 17, 2026
Full deep review covering 7 subsystems with 44 findings.
12 fixes on this branch, 10+ already in PR #40197, 4 deferred.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 20, 2026 02:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 33 out of 33 changed files in this pull request and generated 1 comment.

Comment thread src/shared/inc/message.h
Comment thread src/shared/inc/message.h Outdated
Comment thread src/shared/inc/prettyprintshared.h
Comment thread src/windows/common/filesystem.cpp Outdated
Copilot AI review requested due to automatic review settings April 21, 2026 09:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 33 out of 33 changed files in this pull request and generated no new comments.

@chemwolf6922 chemwolf6922 merged commit 58bd525 into master Apr 22, 2026
13 checks passed
benhillis pushed a commit that referenced this pull request Apr 22, 2026
sizeof(index) incorrectly resolved to a C library function type instead
of the Index parameter, causing a build error on Linux. Fix the casing
to match the parameter name.

Introduced in 58bd525 (#40197).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
benhillis added a commit that referenced this pull request Apr 22, 2026
sizeof(index) incorrectly resolved to a C library function type instead
of the Index parameter, causing a build error on Linux. Fix the casing
to match the parameter name.

Introduced in 58bd525 (#40197).

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants