<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/date/date_core.c, branch v4.0.4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/date] Call rb_gc_register_mark_object after object allocation</title>
<updated>2025-12-06T17:13:32+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-12-06T17:07:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1f0d41aa4d1a3b36e9640e5e8e64c030c71ed613'/>
<id>1f0d41aa4d1a3b36e9640e5e8e64c030c71ed613</id>
<content type='text'>
It's possible that both half_days_in_day and day_in_nanoseconds are Ruby
objects, which means that creating day_in_nanoseconds may trigger GC.
Since half_days_in_day is not registered as a mark object until after
day_in_nanoseconds is allocated, the GC may reclaim half_days_in_day.

We can see this crash:

    ruby(rb_print_backtrace+0xb) [0x63a373c0] vm_dump.c:1105
    ruby(rb_vm_bugreport) vm_dump.c:1450
    ruby(rb_assert_failure_detail+0xdb) [0x6371d3a2] error.c:1216
    ruby(RB_FL_TEST_RAW+0x0) [0x6371d3d5] error.c:1192
    ruby(rb_assert_failure) (null):0
    ruby(rb_gc_impl_writebarrier+0xb4) [0x636f01e4] gc/default/default.c:6103
    ruby(pin_array_list_append+0x72) [0x638f9787] include/ruby/internal/gc.h:788
    ruby(rb_vm_register_global_object) vm.c:4713
    ruby(rb_gc_register_mark_object+0x3a) [0x6374144a] gc.c:3449
    .ext/i686-linux-gnu/date_core.so(Init_date_core+0x204) [0xdbec86c4] ext/date/date_core.c:9511
    .ext/i686-linux-gnu/date_core.so(Init_date_core) (null):0
    ruby(dln_load_and_init+0x71) [0x6392c541] dln.c:521
    ruby(dln_load_feature+0xd2) [0x6392c7d2] dln.c:566
    ruby(load_ext+0xc3) [0x637931b3] load.c:1210
    ruby(rb_vm_pop_frame+0x0) [0x638f80cd] vm.c:3120
    ruby(rb_vm_call_cfunc_in_box) vm.c:3122
    ruby(rb_long2num_inline+0x0) [0x637956f8] load.c:1353
    ruby(require_internal) load.c:1354
    ruby(rb_require_string_internal+0x60) [0x63795fa1] load.c:1457
    ruby(rb_require_string) load.c:1443

https://github.com/ruby/date/commit/cbec5948e0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's possible that both half_days_in_day and day_in_nanoseconds are Ruby
objects, which means that creating day_in_nanoseconds may trigger GC.
Since half_days_in_day is not registered as a mark object until after
day_in_nanoseconds is allocated, the GC may reclaim half_days_in_day.

We can see this crash:

    ruby(rb_print_backtrace+0xb) [0x63a373c0] vm_dump.c:1105
    ruby(rb_vm_bugreport) vm_dump.c:1450
    ruby(rb_assert_failure_detail+0xdb) [0x6371d3a2] error.c:1216
    ruby(RB_FL_TEST_RAW+0x0) [0x6371d3d5] error.c:1192
    ruby(rb_assert_failure) (null):0
    ruby(rb_gc_impl_writebarrier+0xb4) [0x636f01e4] gc/default/default.c:6103
    ruby(pin_array_list_append+0x72) [0x638f9787] include/ruby/internal/gc.h:788
    ruby(rb_vm_register_global_object) vm.c:4713
    ruby(rb_gc_register_mark_object+0x3a) [0x6374144a] gc.c:3449
    .ext/i686-linux-gnu/date_core.so(Init_date_core+0x204) [0xdbec86c4] ext/date/date_core.c:9511
    .ext/i686-linux-gnu/date_core.so(Init_date_core) (null):0
    ruby(dln_load_and_init+0x71) [0x6392c541] dln.c:521
    ruby(dln_load_feature+0xd2) [0x6392c7d2] dln.c:566
    ruby(load_ext+0xc3) [0x637931b3] load.c:1210
    ruby(rb_vm_pop_frame+0x0) [0x638f80cd] vm.c:3120
    ruby(rb_vm_call_cfunc_in_box) vm.c:3122
    ruby(rb_long2num_inline+0x0) [0x637956f8] load.c:1353
    ruby(require_internal) load.c:1354
    ruby(rb_require_string_internal+0x60) [0x63795fa1] load.c:1457
    ruby(rb_require_string) load.c:1443

https://github.com/ruby/date/commit/cbec5948e0
</pre>
</div>
</content>
</entry>
<entry>
<title>Reorganize page documentations (#15154)</title>
<updated>2025-11-27T20:12:24+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2025-11-27T20:12:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4cd6661e1853930c8002174c4ccd14f927fcd33b'/>
<id>4cd6661e1853930c8002174c4ccd14f927fcd33b</id>
<content type='text'>
Re-organize page docs</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Re-organize page docs</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/date] `Date._parse` does not accept `nil`</title>
<updated>2025-10-06T05:22:03+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-10-06T05:17:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e6188c45e1114be3be4955971464f1b39d567d71'/>
<id>e6188c45e1114be3be4955971464f1b39d567d71</id>
<content type='text'>
https://github.com/ruby/date/commit/545066ca28
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/date/commit/545066ca28
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/date] Do not repeat conversions to string</title>
<updated>2025-10-06T04:16:56+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-10-05T12:18:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f13e68e252ee96ee01e3b6eb11ad4109d5e033b1'/>
<id>f13e68e252ee96ee01e3b6eb11ad4109d5e033b1</id>
<content type='text'>
https://github.com/ruby/date/commit/159e1ebb7f
https://github.com/ruby/date/commit/4f7b6c9b42
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/date/commit/159e1ebb7f
https://github.com/ruby/date/commit/4f7b6c9b42
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/date] Suppress maybe-uninitialized warning by gcc-13</title>
<updated>2025-09-15T08:02:07+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-09-15T07:56:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6d2f93f17022bb89ffed7c8f12ad6a8ef048e2b2'/>
<id>6d2f93f17022bb89ffed7c8f12ad6a8ef048e2b2</id>
<content type='text'>
https://github.com/ruby/date/commit/afaa4a997b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/date/commit/afaa4a997b
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/date] [Bug #21436] check for fixnum lower bound in `m_ajd`</title>
<updated>2025-06-15T16:12:45+00:00</updated>
<author>
<name>Dmitry Dygalo</name>
<email>dadygalo@gmail.com</email>
</author>
<published>2025-06-15T16:12:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=022c18b60d2245980abcdd7b5195eebca73b8809'/>
<id>022c18b60d2245980abcdd7b5195eebca73b8809</id>
<content type='text'>
Issue - https://bugs.ruby-lang.org/issues/21436

Apparently, the lower bound check is missing, which results in overflow &amp; wrapping later on in RB_INT2FIX

Signed-off-by: Dmitry Dygalo &lt;dmitry.dygalo@workato.com&gt;

https://github.com/ruby/date/commit/67d75e8423
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue - https://bugs.ruby-lang.org/issues/21436

Apparently, the lower bound check is missing, which results in overflow &amp; wrapping later on in RB_INT2FIX

Signed-off-by: Dmitry Dygalo &lt;dmitry.dygalo@workato.com&gt;

https://github.com/ruby/date/commit/67d75e8423
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/date] [Bug #21437] Date#hash for large years</title>
<updated>2025-06-15T16:11:06+00:00</updated>
<author>
<name>Dmitry Dygalo</name>
<email>dadygalo@gmail.com</email>
</author>
<published>2025-06-15T16:11:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c1877d431e76f4a782d51602fa8487e98d302956'/>
<id>c1877d431e76f4a782d51602fa8487e98d302956</id>
<content type='text'>
Addresses https://bugs.ruby-lang.org/issues/21437

Signed-off-by: Dmitry Dygalo &lt;dmitry.dygalo@workato.com&gt;

https://github.com/ruby/date/commit/31f07bc576
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Addresses https://bugs.ruby-lang.org/issues/21437

Signed-off-by: Dmitry Dygalo &lt;dmitry.dygalo@workato.com&gt;

https://github.com/ruby/date/commit/31f07bc576
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/date] d_lite_marshal_load: copy ivars in the right order</title>
<updated>2025-06-13T17:46:10+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-06-13T17:45:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fb0dbbc0e660d0c77ebba292578945aca8baafac'/>
<id>fb0dbbc0e660d0c77ebba292578945aca8baafac</id>
<content type='text'>
https://github.com/ruby/date/commit/dbf4e957dc
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/date/commit/dbf4e957dc
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/date] Remove references to FL_EXIVAR</title>
<updated>2025-06-13T17:40:43+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-06-13T17:36:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=99a72df16d6174f171754c3a4dcd48c07108097e'/>
<id>99a72df16d6174f171754c3a4dcd48c07108097e</id>
<content type='text'>
This flag isn't really meant to be public, it's an implementation
detail of Ruby.

And checking it before calling `rb_copy_generic_ivar` only save
a function call.

https://github.com/ruby/date/commit/8175252653
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This flag isn't really meant to be public, it's an implementation
detail of Ruby.

And checking it before calling `rb_copy_generic_ivar` only save
a function call.

https://github.com/ruby/date/commit/8175252653
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/date] Suppress warnings by gcc-13 with `-Og`</title>
<updated>2025-06-05T14:18:38+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-06-05T14:12:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=998e5791c5c119fe050e81ed0ac35a45df4921dc'/>
<id>998e5791c5c119fe050e81ed0ac35a45df4921dc</id>
<content type='text'>
https://github.com/ruby/date/commit/6dd7969a64
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/date/commit/6dd7969a64
</pre>
</div>
</content>
</entry>
</feed>
