Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up error throwing code in UDP sockets #16959

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jarred-Sumner
Copy link
Collaborator

What does this PR do?

JSC.Maybe(void).errnoSys can return null if errno is 0. This leads to a null pointer dereference, most likely causing the below crash:

Bun v1.2.1 (ce53290) on linux x86_64 [AutoCommand]

Segmentation fault at address 0x00000000

uws.zig:4563: src.bun.js.api.bun.udp_socket.UDPSocket.setMembership
udp_socket.zig:469: UDPSocketPrototype__addMembership
ZigGeneratedClasses.cpp:47883: WebCore::UDPSocketPrototype__addMembershipCallback
1 unknown/js code
ld-temp.o:0: llint_op_call_ignore_result
ld-temp.o:0: llint_op_call_ignore_result
ld-temp.o:0: llint_op_call_ignore_result
ld-temp.o:0: llint_op_call_ignore_result

How did you verify your code works?

@Jarred-Sumner Jarred-Sumner requested a review from heimskr February 1, 2025 06:06
@robobun
Copy link

robobun commented Feb 1, 2025

Updated 10:27 PM PT - Jan 31st, 2025

@Jarred-Sumner, your commit aebbe91 has some failures in Build #10961


🧪   try this PR locally:

bunx bun-pr 16959

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