Backport/remove brew llvm 9.0#125782
Closed
steveisok wants to merge 2 commits intodotnet:release/9.0from
Closed
Conversation
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
Contributor
There was a problem hiding this comment.
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
llvmon 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; | ||
| } |
Contributor
|
Tagging subscribers to this area: @karelz, @dotnet/ncl |
This was referenced Mar 19, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.