Skip to content

Conversation

@naftaly
Copy link
Contributor

@naftaly naftaly commented Oct 13, 2025

Summary

Adds support for Thread Sanitizer (TSan) and Address Sanitizer (ASan) to help detect bugs during testing.

  • Thread Sanitizer: Detects data races and other threading issues
  • Address Sanitizer: Detects memory corruption issues like buffer overflows and use-after-free

Changes

  • Added new sanitizer input parameter to action.yml (accepts thread or address)
  • Updated index.ts to pass -enableThreadSanitizer or -enableAddressSanitizer flags to xcodebuild when sanitizers are enabled
  • Sanitizers only apply to test and build-for-testing actions
  • Added documentation to README with usage examples
  • Added CI workflow job to verify both sanitizers work correctly on macOS

Usage

- uses: mxcl/xcodebuild@v3
    with:
      action: test
      sanitizer: thread  # or 'address'

Note: Only one sanitizer can be enabled at a time.

@mxcl mxcl requested a review from Copilot October 15, 2025 18:39
Copy link

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

This PR adds sanitizer support to the xcodebuild action, enabling Thread Sanitizer (TSan) and Address Sanitizer (ASan) for detecting bugs during testing. The implementation allows users to specify either "thread" or "address" sanitizer through a new input parameter.

  • Added sanitizer input parameter with support for thread and address sanitizers
  • Updated xcodebuild command generation to include appropriate sanitizer flags
  • Added comprehensive documentation and CI verification

Reviewed Changes

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

File Description
src/index.ts Added sanitizer input handling and xcodebuild flag generation for test/build-for-testing actions
action.yml Added new sanitizer input parameter with detailed description of options
README.md Added sanitizer documentation with usage examples for both TSan and ASan
.github/workflows/checks.yml Added CI job to verify sanitizer functionality on macOS

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@naftaly
Copy link
Contributor Author

naftaly commented Oct 17, 2025

@mxcl Added the dist that weren't there and caused the failures.

@mxcl mxcl merged commit d3ee9b4 into mxcl:master Oct 20, 2025
35 of 36 checks passed
@naftaly
Copy link
Contributor Author

naftaly commented Oct 20, 2025

Thank you @mxcl

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.

2 participants