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

Introduce RUBY_ASSERT(ruby_thread_has_gvl_p()) to detect invalid interface usage. #11975

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

Conversation

ioquatix
Copy link
Member

@ioquatix ioquatix commented Nov 1, 2024

Copy link
Contributor

@jeremyevans jeremyevans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The zlib changes should be sent upstream to ruby/zlib. string.c changes look fine.

@jeremyevans
Copy link
Contributor

Never mind, looks like you did submit the changes ro ruby/zlib already: ruby/zlib#88

@ioquatix ioquatix marked this pull request as draft November 7, 2024 00:28
@ioquatix ioquatix force-pushed the assert-gvl branch 2 times, most recently from 4258ece to 2407017 Compare November 7, 2024 00:30
Copy link
Contributor

@jeremyevans jeremyevans left a 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.

This is being done to debug issues in the `zlib` extension.

[Feature #20877]
@ioquatix ioquatix marked this pull request as ready for review November 7, 2024 01:01
@ioquatix
Copy link
Member Author

ioquatix commented Nov 7, 2024

The reason why this PR is failing is because zlib.c is using the C functions without holding the GVL. Once ruby/zlib#88 is merged, this PR will become green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants