Skip to content

Fix: must take Errno.value within Fiber.syscall(&) [fixup #15871]#16679

Merged
straight-shoota merged 1 commit intocrystal-lang:masterfrom
ysbaddaden:fix/check-errno-within-fiber-syscall-block
Feb 26, 2026
Merged

Fix: must take Errno.value within Fiber.syscall(&) [fixup #15871]#16679
straight-shoota merged 1 commit intocrystal-lang:masterfrom
ysbaddaden:fix/check-errno-within-fiber-syscall-block

Conversation

@ysbaddaden
Copy link
Collaborator

@ysbaddaden ysbaddaden commented Feb 24, 2026

We must access Errno.value within the Fiber.syscall(&) block, not after the block returned because there can be a context switch before the method returns, and errno is no longer valid.

Fixup #15871.

@straight-shoota straight-shoota added this to the 1.20.0 milestone Feb 24, 2026
@ysbaddaden ysbaddaden moved this from Review to Approved in Multi-threading Feb 24, 2026
@straight-shoota straight-shoota merged commit 19a1ab3 into crystal-lang:master Feb 26, 2026
47 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in Multi-threading Feb 26, 2026
@ysbaddaden ysbaddaden deleted the fix/check-errno-within-fiber-syscall-block branch February 26, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:multithreading topic:stdlib:runtime

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants