Skip to content

Backport/remove brew llvm 9.0#125782

Closed
steveisok wants to merge 2 commits intodotnet:release/9.0from
steveisok:backport/remove-brew-llvm-9.0
Closed

Backport/remove brew llvm 9.0#125782
steveisok wants to merge 2 commits intodotnet:release/9.0from
steveisok:backport/remove-brew-llvm-9.0

Conversation

@steveisok
Copy link
Member

No description provided.

github-actions bot and others added 2 commits March 12, 2026 17:30
dotnet#123661)

Backport of dotnet#123485 to release/9.0-staging

/cc @liveans

Increasing RFC compliance for WebSocket

## Customer Impact

RFC compliance

## Regression

No

## Testing

Manual verification + automated tests

## Risk

Low, the change only affects non‑compliant WebSocket clients sending
unmasked frames, which is explicitly disallowed by RFC 6455. No behavior
change is expected for compliant clients.

---------

Co-authored-by: Ahmet İbrahim Aksoy <aaksoy@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The CI runner image may ship with a Homebrew LLVM whose libraries
(e.g., an x86_64-only libunwind.dylib in /usr/local/lib) conflict with
the Apple SDK and break native linking. The build uses Apple clang from
/usr/bin/clang exclusively and does not need Homebrew LLVM.

Backport of dotnet#125763
Copilot AI review requested due to automatic review settings March 19, 2026 17:01
@steveisok steveisok closed this Mar 19, 2026
Copy link
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

This PR updates macOS native-dependency installation to avoid Homebrew LLVM toolchain conflicts and adds stricter WebSocket protocol validation when running in server mode.

Changes:

  • Uninstall Homebrew llvm on Apple platforms during native dependency setup to prevent linker/library conflicts.
  • Treat unmasked client frames received by a server WebSocket as a protocol error with a dedicated resource string.
  • Add a regression test covering the server-side unmasked-frame failure.

Reviewed changes

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

File Description
src/libraries/System.Net.WebSockets/tests/WebSocketTests.cs Adds a test asserting server-mode receive rejects an unmasked frame and aborts.
src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/ManagedWebSocket.cs Adds protocol validation to reject unmasked frames when _isServer is true.
src/libraries/System.Net.WebSockets/src/Resources/Strings.resx Introduces the new localized error message for server receiving an unmasked frame.
eng/install-native-dependencies.sh Uninstalls Homebrew LLVM on Apple platforms before running brew bundle.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +48 to 54
# Remove Homebrew LLVM if present. The CI runner image may ship with a
# Homebrew LLVM whose libraries (e.g., libunwind.dylib) are the wrong
# architecture or conflict with the Apple SDK, breaking native linking.
# The build uses Apple clang from /usr/bin/clang exclusively.
brew uninstall --ignore-dependencies llvm 2>/dev/null || true

brew bundle --no-upgrade --file "$(dirname "$0")/Brewfile"
Comment on lines +1369 to +1373
else if (_isServer)
{
resultHeader = default;
return SR.net_Websockets_ServerReceivedUnmaskedFrame;
}
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @karelz, @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants