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

Projects
None yet
3 participants
@bouk
Contributor

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;

This comment has been minimized.

@bouk

bouk Nov 25, 2016

Contributor

@matz does this need to be added to root_scan_phase ?

@bouk

bouk Nov 25, 2016

Contributor

@matz does this need to be added to root_scan_phase ?

@matz

This comment has been minimized.

Show comment
Hide comment
@matz

matz Nov 29, 2016

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@bouk

bouk Nov 29, 2016

Contributor

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

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@matz

matz Nov 29, 2016

Member

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

Member

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 bouk: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