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

Put a reference to the range_class in mrb_state #3294

Closed
wants to merge 1 commit into from

Conversation

bouk
Copy link
Contributor

@bouk bouk commented Nov 25, 2016

Can cause segfaults otherwise

@@ -191,6 +191,7 @@ typedef struct mrb_state {
struct RClass *proc_class;
struct RClass *string_class;
struct RClass *array_class;
struct RClass *range_class;
Copy link
Contributor Author

@bouk bouk Nov 25, 2016

Choose a reason for hiding this comment

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

@matz does this need to be added to root_scan_phase ?

@matz
Copy link
Member

@matz matz commented Nov 29, 2016

I don't want to increase the size of mrb_state if possible. Could you tell us how we can cause SEGV?

@bouk
Copy link
Contributor Author

@bouk bouk commented Nov 29, 2016

If you look at the test, you can see that you can do Range = Array which will create a TT_RANGE with Array class. We could also save the range class as a global variable

@matz
Copy link
Member

@matz matz commented Nov 29, 2016

Sorry, I found the error reproducing code in the PR. I think I found the work around.

@matz matz closed this in 630733f Nov 29, 2016
@bouk bouk deleted the range-type-conf branch Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants