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

skip marking for uninitialized imemo_env. #4342

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

ko1
Copy link
Contributor

@ko1 ko1 commented Mar 31, 2021

RUBY_INTERNAL_EVENT_NEWOBJ can expose uninitialized imemo_env
objects and marking it will cause critical error. This patch
skips marking on uninitialized imemo_env.

See: http://rubyci.s3.amazonaws.com/centos7/ruby-master/log/20210329T183003Z.fail.html.gz

Shortest repro-code is provided by mame-san.

RUBY_INTERNAL_EVENT_NEWOBJ can expose uninitialized imemo_env
objects and marking it will cause critical error. This patch
skips marking on uninitialized imemo_env.

See: http://rubyci.s3.amazonaws.com/centos7/ruby-master/log/20210329T183003Z.fail.html.gz

Shortest repro-code is provided by mame-san.
Comment on lines +247 to +256
prev = GC.stress
GC.stress = true

ObjectSpace.trace_object_allocations{
proc{}
}

assert true # success
ensure
GC.stress = prev
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
prev = GC.stress
GC.stress = true
ObjectSpace.trace_object_allocations{
proc{}
}
assert true # success
ensure
GC.stress = prev
EnvUtil.under_gc_stress do
ObjectSpace.trace_object_allocations{
proc{}
}
end

@ko1 ko1 merged commit 1fac99a into ruby:master Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants