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

Fix GC sig_suspend, sig_resume for gc_none #15349

Conversation

ysbaddaden
Copy link
Contributor

@ysbaddaden ysbaddaden commented Jan 16, 2025

The gc_none interface doesn't define the sig_suspend nor sig_resume class methods. The program should still compile but commit 57017f6 improperly checks for the method existence, and the methods are always required and compilation fails.

The following is enough to reproduce:

$ bin/crystal spec -Dgc_none spec/std/process_spec.cr
In src/crystal/system/unix/pthread.cr:273:10

 273 | GC.sig_suspend
          ^----------
Error: undefined method 'sig_suspend' for GC:Module

Closes ysbaddaden/gc#32

The gc_none interface doesn't define the `sig_suspend` nor `sig_resume`
class methods. The program should still compile but commit 57017f6
improperly checks for the method existence, and the methods are always
required and the fallback never used.
@ysbaddaden ysbaddaden added topic:stdlib:system kind:regression Something that used to correctly work but no longer works labels Jan 16, 2025
@ysbaddaden ysbaddaden self-assigned this Jan 16, 2025
@straight-shoota straight-shoota added this to the 1.15.1 milestone Jan 16, 2025
@straight-shoota straight-shoota changed the title Fix: undefined method 'sig_suspend' for GC:Module (gc_none) Fix GC sig_suspend, sig_resume for gc_none Jan 17, 2025
@straight-shoota straight-shoota merged commit 0fbdcc9 into crystal-lang:master Jan 17, 2025
70 checks passed
@ysbaddaden ysbaddaden deleted the fix/unix-pthread-integration-with-gc-signals branch January 17, 2025 12:42
github-actions bot pushed a commit that referenced this pull request Jan 27, 2025
The gc_none interface doesn't define the `sig_suspend` nor `sig_resume` class methods. The program should still compile but commit 57017f6 improperly checks for the method existence, and the methods are always required and compilation fails.

(cherry picked from commit 0fbdcc9)
Copy link

Successfully created backport PR for release/1.15:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release/1.15 kind:regression Something that used to correctly work but no longer works topic:stdlib:system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not compatible with crystal 1.15?
2 participants