-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Introduce RUBY_ASSERT(ruby_thread_has_gvl_p())
to detect invalid interface usage.
#11975
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
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
4258ece
to
2407017
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend updating the commit message to describe that this is being done to debug issues in the zlib extension. Code changes look fine.
The reason why this PR is failing is because |
5c67610
to
d129a25
Compare
feb1785
to
21298de
Compare
fed65e8
to
44d74e1
Compare
Do you plan to introduce assertions to all of |
I feel like we should, but it's also quite a lot of work. So for now, my main goal is to find any bugs. Therefore, adding it to methods like If you have a different idea, please let me know. |
83b7e0a
to
c6e76ce
Compare
This comment has been minimized.
This comment has been minimized.
b144c5c
to
53b79bc
Compare
If you see an error like this:
It might mean you are (1) using a build of Ruby that includes this PR, but (2) haven't updated zlib gem to the latest version which does not trigger this assertion. |
https://bugs.ruby-lang.org/issues/20877
This was originally to demonstrate/show the problems with zlib. That has now been fixed: ruby/zlib#88
This change helps us find other (similar) issues and prevent regressions.