<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/gc.c, branch v4.0.3</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Move special const check to gc.c for rb_gc_impl_object_moved_p</title>
<updated>2025-12-23T18:54:08+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-12-23T17:59:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e2cf92eddc5403316b0d449b02ba403a27610d7b'/>
<id>e2cf92eddc5403316b0d449b02ba403a27610d7b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Check slot_size before zeroing memory for GC hook</title>
<updated>2025-12-20T16:27:34+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-12-20T13:40:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fe9a7448b131a48ee37df720fbbfae3142d274ca'/>
<id>fe9a7448b131a48ee37df720fbbfae3142d274ca</id>
<content type='text'>
If the slot_size &lt; RVALUE_SIZE then we would underflow in the memset.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the slot_size &lt; RVALUE_SIZE then we would underflow in the memset.
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Small changes to docs for ObjectSpace#each_object (#15564)</title>
<updated>2025-12-17T19:00:58+00:00</updated>
<author>
<name>Luke Gruber</name>
<email>luke.gruber@shopify.com</email>
</author>
<published>2025-12-17T19:00:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=601ac78caf1523170b2f88767d67ffa5e8c5b1bc'/>
<id>601ac78caf1523170b2f88767d67ffa5e8c5b1bc</id>
<content type='text'>
Change example to use user-defined class instead of `Numeric`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change example to use user-defined class instead of `Numeric`.</pre>
</div>
</content>
</entry>
<entry>
<title>Rename to `struct rbimpl_size_overflow_tag`</title>
<updated>2025-12-17T08:35:58+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-12-17T05:28:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=61bab1889048f758396acf671c9797d6bc52504b'/>
<id>61bab1889048f758396acf671c9797d6bc52504b</id>
<content type='text'>
This struct is used for addition not only for multiplication, so
remove the word `mul`, and make the member names more descriptive.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This struct is used for addition not only for multiplication, so
remove the word `mul`, and make the member names more descriptive.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add assumption to free_vm_weak_references</title>
<updated>2025-12-11T17:53:18+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2025-12-06T10:16:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=89e09e4daf1b27c94dbf326c8f5b0b5f864a6e72'/>
<id>89e09e4daf1b27c94dbf326c8f5b0b5f864a6e72</id>
<content type='text'>
Help the compiler know that we always get a heap object here.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Help the compiler know that we always get a heap object here.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add `NUM2PTR` and `PTR2NUM` macros</title>
<updated>2025-12-10T03:09:50+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-12-10T03:09:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3636277dc5837bcedcd5ef43d49423194064a676'/>
<id>3636277dc5837bcedcd5ef43d49423194064a676</id>
<content type='text'>
These macros have been defined here and there, so collect them.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These macros have been defined here and there, so collect them.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typos in gc.c and gc.rb</title>
<updated>2025-12-09T07:45:38+00:00</updated>
<author>
<name>hi</name>
<email>hi@localhost</email>
</author>
<published>2025-12-05T14:56:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=25f277abe481b9109d59d28a2eee3f9998a9ad3a'/>
<id>25f277abe481b9109d59d28a2eee3f9998a9ad3a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Output ivar length for T_OBJECT in obj_info</title>
<updated>2025-12-07T16:51:02+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-12-07T15:24:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4f900c35bc01e12b948703b9e4b4f5d0e803f073'/>
<id>4f900c35bc01e12b948703b9e4b4f5d0e803f073</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix id2ref for multi-Ractor</title>
<updated>2025-12-06T18:08:24+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-12-06T16:47:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=588347a088625b5c16eedbc5f3a7a1189a427e25'/>
<id>588347a088625b5c16eedbc5f3a7a1189a427e25</id>
<content type='text'>
The id2ref table needs to be under a VM lock to ensure there are no race
conditions. The following script crashes:

    o = Object.new

    ObjectSpace._id2ref(o.object_id)

    10.times.map do
      Ractor.new do
        10_000.times do
          a = Object.new
          a.object_id
        end
      end
    end.map(&amp;:value)

With:

    [BUG] Object ID seen, but not in _id2ref table: object_id=2800 object=T_OBJECT
    ruby 4.0.0dev (2025-12-06T15:15:43Z ractor-id2ref-fix e7f9abdc91) +PRISM [x86_64-linux]

    -- Control frame information -----------------------------------------------
    c:0001 p:---- s:0003 e:000002 l:y b:---- DUMMY  [FINISH]

    -- Threading information ---------------------------------------------------
    Total ractor count: 5
    Ruby thread count for this ractor: 1

    -- C level backtrace information -------------------------------------------
    miniruby(rb_print_backtrace+0x14) [0x6047d09b2dff] vm_dump.c:1105
    miniruby(rb_vm_bugreport) vm_dump.c:1450
    miniruby(rb_bug_without_die_internal+0x5f) [0x6047d066bf57] error.c:1098
    miniruby(rb_bug) error.c:1116
    miniruby(rb_gc_get_ractor_newobj_cache+0x0) [0x6047d066c8dd] gc.c:2052
    miniruby(gc_sweep_plane+0xad) [0x6047d079276d] gc/default/default.c:3513
    miniruby(gc_sweep_page) gc/default/default.c:3605
    miniruby(gc_sweep_step) gc/default/default.c:3886
    miniruby(gc_sweep+0x1ba) [0x6047d0794cfa] gc/default/default.c:4154
    miniruby(gc_start+0xbf2) [0x6047d0796742] gc/default/default.c:6519
    miniruby(heap_prepare+0xcc) [0x6047d079748c] gc/default/default.c:2090
    miniruby(heap_next_free_page) gc/default/default.c:2305
    miniruby(newobj_cache_miss) gc/default/default.c:2412
    miniruby(newobj_alloc+0xd) [0x6047d0798ff5] gc/default/default.c:2436
    miniruby(rb_gc_impl_new_obj) gc/default/default.c:2515
    miniruby(newobj_of) gc.c:996
    miniruby(rb_wb_protected_newobj_of) gc.c:1046
    miniruby(str_alloc_embed+0x28) [0x6047d08fda18] string.c:1019
    miniruby(str_enc_new) string.c:1069
    miniruby(prep_io+0x5) [0x6047d07cda14] io.c:9305
    miniruby(prep_stdio) io.c:9347
    miniruby(rb_io_prep_stdin) io.c:9365
    miniruby(thread_start_func_2+0x77c) [0x6047d093a55c] thread.c:679
    miniruby(thread_sched_lock_+0x0) [0x6047d093aacd] thread_pthread.c:2241
    miniruby(co_start) thread_pthread_mn.c:469
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The id2ref table needs to be under a VM lock to ensure there are no race
conditions. The following script crashes:

    o = Object.new

    ObjectSpace._id2ref(o.object_id)

    10.times.map do
      Ractor.new do
        10_000.times do
          a = Object.new
          a.object_id
        end
      end
    end.map(&amp;:value)

With:

    [BUG] Object ID seen, but not in _id2ref table: object_id=2800 object=T_OBJECT
    ruby 4.0.0dev (2025-12-06T15:15:43Z ractor-id2ref-fix e7f9abdc91) +PRISM [x86_64-linux]

    -- Control frame information -----------------------------------------------
    c:0001 p:---- s:0003 e:000002 l:y b:---- DUMMY  [FINISH]

    -- Threading information ---------------------------------------------------
    Total ractor count: 5
    Ruby thread count for this ractor: 1

    -- C level backtrace information -------------------------------------------
    miniruby(rb_print_backtrace+0x14) [0x6047d09b2dff] vm_dump.c:1105
    miniruby(rb_vm_bugreport) vm_dump.c:1450
    miniruby(rb_bug_without_die_internal+0x5f) [0x6047d066bf57] error.c:1098
    miniruby(rb_bug) error.c:1116
    miniruby(rb_gc_get_ractor_newobj_cache+0x0) [0x6047d066c8dd] gc.c:2052
    miniruby(gc_sweep_plane+0xad) [0x6047d079276d] gc/default/default.c:3513
    miniruby(gc_sweep_page) gc/default/default.c:3605
    miniruby(gc_sweep_step) gc/default/default.c:3886
    miniruby(gc_sweep+0x1ba) [0x6047d0794cfa] gc/default/default.c:4154
    miniruby(gc_start+0xbf2) [0x6047d0796742] gc/default/default.c:6519
    miniruby(heap_prepare+0xcc) [0x6047d079748c] gc/default/default.c:2090
    miniruby(heap_next_free_page) gc/default/default.c:2305
    miniruby(newobj_cache_miss) gc/default/default.c:2412
    miniruby(newobj_alloc+0xd) [0x6047d0798ff5] gc/default/default.c:2436
    miniruby(rb_gc_impl_new_obj) gc/default/default.c:2515
    miniruby(newobj_of) gc.c:996
    miniruby(rb_wb_protected_newobj_of) gc.c:1046
    miniruby(str_alloc_embed+0x28) [0x6047d08fda18] string.c:1019
    miniruby(str_enc_new) string.c:1069
    miniruby(prep_io+0x5) [0x6047d07cda14] io.c:9305
    miniruby(prep_stdio) io.c:9347
    miniruby(rb_io_prep_stdin) io.c:9365
    miniruby(thread_start_func_2+0x77c) [0x6047d093a55c] thread.c:679
    miniruby(thread_sched_lock_+0x0) [0x6047d093aacd] thread_pthread.c:2241
    miniruby(co_start) thread_pthread_mn.c:469
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "gc.c: Pass shape_id to `newobj_init`"</title>
<updated>2025-12-05T23:40:39+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-12-05T22:08:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=791acc5697afc8f256e652169f7c85a3d90b3f06'/>
<id>791acc5697afc8f256e652169f7c85a3d90b3f06</id>
<content type='text'>
This reverts commit 228d13f6ed914d1e7f6bd2416e3f5be8283be865.

This commit makes default.c and mmtk.c depend on shape.h, which prevents
them from building independently.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 228d13f6ed914d1e7f6bd2416e3f5be8283be865.

This commit makes default.c and mmtk.c depend on shape.h, which prevents
them from building independently.
</pre>
</div>
</content>
</entry>
</feed>
