-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add fiber safety to object class getter/property macros #15387
base: master
Are you sure you want to change the base?
Add fiber safety to object class getter/property macros #15387
Conversation
c77343c
to
a888edb
Compare
Damn. The interpreter is still broken on windows. |
I'm using the released 1.15.0 compiler for windows. I'm running The interpreter on windows can't reach |
Yeah, if I call |
Gotcha 🐛 The interpreter requires the prelude which in turn:
I guess we should load |
The interpreter on windows segfaults because `Crystal::Once.init` wasn't called soon enough: - require "string" - require "string/builder" - require "io" - require "io/file_descriptor" - require "crystal/system/win32/file_descriptor" - at_exit <== inlined call! - Crystal::AtExitHandlers#class_getter(handlers) { ... } <== calls Crystal.once! - (...) - require "crystal/main" - Crystal.init_runtime - Crystal::Once.init <== only initialized now! Requiring crystal/main sooner makes sure that the interpreter will execute `Crystal.init_runtime` before any other inlined call that may depend on `Crystal.once`.
closes #14905
Builds on top of the prerequisite refactors/features. Only the last commit actually implements the feature.