Project

General

Profile

Actions

Bug #19880

closed

Missing write barrier in iseq instruction list

Added by peterzhu2118 (Peter Zhu) 8 months ago. Updated 7 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:114734]

Description

There's a missing write barrier for operands in the iseq instruction list, which can cause crashes. This bug has been fixed in commit b3b57f7.

It can be reproduced when Ruby is compiled with -DRUBY_DEBUG_ENV=1. Using the following command:

RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=0 RUBY_DEBUG=gc_stress ruby -w --disable=gems -Itool/lib -W0 test.rb

The following script crashes:

require "test/unit"

I have backports for Ruby 3.1 and Ruby 3.2 available here:

3.1: https://github.com/ruby/ruby/pull/8430
3.2: https://github.com/ruby/ruby/pull/8431

Actions #1

Updated by peterzhu2118 (Peter Zhu) 8 months ago

  • Status changed from Open to Closed

Updated by nagachika (Tomoyuki Chikanaga) 8 months ago

  • Backport changed from 3.0: UNKNOWN, 3.1: REQUIRED, 3.2: REQUIRED to 3.0: UNKNOWN, 3.1: REQUIRED, 3.2: DONE

Updated by usa (Usaku NAKAMURA) 7 months ago

  • Backport changed from 3.0: UNKNOWN, 3.1: REQUIRED, 3.2: DONE to 3.0: UNKNOWN, 3.1: DONE, 3.2: DONE

ruby_3_1 e031eff34387f300be27c24a725ddaa17f18f7e3.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0