Skip to content

Fix potential SIGSEGV in SbSocketWaiterPrivate initialization - #8464

Merged
kaidokert merged 1 commit into
youtube:25.lts.1+from
msolya:fix_socket_crash
Feb 17, 2026
Merged

kaidokert merged 1 commit into
youtube:25.lts.1+from
msolya:fix_socket_crash

Conversation

@msolya

@msolya msolya commented Dec 18, 2025

Copy link
Copy Markdown
Collaborator

Replace SB_DCHECK with SB_CHECK when validating server_socket in GetSocketPipe().

SB_DCHECK is compiled out in Release builds, leading to undefined behavior (null pointer dereference) when AcceptBySpinning() fails or times out. This UB manifests as SIGSEGV crash at line 146 when accessing server_socket_->socket_fd.

SB_CHECK ensures validation in all build configurations and provides clear error message on failure instead of unpredictable crash.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Gemini Suggested Commit Message


Error: Could not parse a valid response from the Gemini API. Please check the API response logs in the workflow run.

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

The change correctly addresses a potential SIGSEGV crash in release builds by replacing SB_DCHECK with SB_CHECK for validating the server_socket. This ensures that critical validation occurs in all build configurations, preventing undefined behavior and improving the stability of the application.

@amurovanyi
amurovanyi self-requested a review December 18, 2025 15:57

@amurovanyi amurovanyi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@victorpasoshnikov victorpasoshnikov removed their assignment Dec 19, 2025
@victorpasoshnikov
victorpasoshnikov self-requested a review December 19, 2025 14:00
@msolya msolya changed the title xb: fix potential SIGSEGV in SbSocketWaiterPrivate initialization PS: fix potential SIGSEGV in SbSocketWaiterPrivate initialization Feb 16, 2026
Replace SB_DCHECK with SB_CHECK when validating server_socket in
GetSocketPipe().

SB_DCHECK is compiled out in Release builds, leading to undefined
behavior (null pointer dereference) when AcceptBySpinning() fails
or times out. This UB manifests as SIGSEGV crash at line 146 when
accessing server_socket_->socket_fd.

SB_CHECK ensures validation in all build configurations and provides
clear error message on failure instead of unpredictable crash.
@msolya msolya changed the title PS: fix potential SIGSEGV in SbSocketWaiterPrivate initialization Fix potential SIGSEGV in SbSocketWaiterPrivate initialization Feb 16, 2026

@kaidokert kaidokert left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks fine to me - better clear crash here thatn invisibly failing.

@jellefoks thoughts ?

@kaidokert
kaidokert merged commit 62fd88e into youtube:25.lts.1+ Feb 17, 2026
253 of 255 checks passed
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.

5 participants