<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/io_buffer.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>[DOC] Fix IO::Buffer document</title>
<updated>2025-12-24T02:14:29+00:00</updated>
<author>
<name>TOMITA Masahiro</name>
<email>tommy@tmtm.org</email>
</author>
<published>2025-11-06T00:09:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=10a68210b4c96ab2de21357907627e1fb34ce000'/>
<id>10a68210b4c96ab2de21357907627e1fb34ce000</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>IO::Buffer: Warn as experimental at allocation</title>
<updated>2025-12-17T03:35:38+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-12-11T06:27:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7c402d2c2757b38df8b9406b372d2e1f406296ae'/>
<id>7c402d2c2757b38df8b9406b372d2e1f406296ae</id>
<content type='text'>
Previously, warned only in `new` and `map`, but not `for` and
`string`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, warned only in `new` and `map`, but not `for` and
`string`.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #21787] IO::Buffer: Check addition overflows</title>
<updated>2025-12-17T03:35:38+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-11-22T14:43:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c353b625297162024b5a80480664e599dd49a294'/>
<id>c353b625297162024b5a80480664e599dd49a294</id>
<content type='text'>
https://hackerone.com/reports/3437743
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://hackerone.com/reports/3437743
</pre>
</div>
</content>
</entry>
<entry>
<title>IO::Buffer: Guard arguments from GC</title>
<updated>2025-12-17T03:35:38+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-11-22T14:41:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9519d16381c8a8ddf7e1128a08fd80dfac8ed327'/>
<id>9519d16381c8a8ddf7e1128a08fd80dfac8ed327</id>
<content type='text'>
At least, `string` in `io_buffer_set_string` can be different from
`argv[0]` after `rb_str_to_str` call.  The other cases may not be
necessary.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At least, `string` in `io_buffer_set_string` can be different from
`argv[0]` after `rb_str_to_str` call.  The other cases may not be
necessary.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix strict aliasing warning in rb_int128_to_numeric</title>
<updated>2025-12-08T23:01:05+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-12-07T17:43:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=55ea3ec00f5166423cd7dcd67e220cd264a766f6'/>
<id>55ea3ec00f5166423cd7dcd67e220cd264a766f6</id>
<content type='text'>
If we don't have uint128, then rb_int128_to_numeric emits a strict
aliasing warning:

    numeric.c:3641:39: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
    3641 |         return rb_uint128_to_numeric(*(rb_uint128_t*)&amp;n);
         |                                       ^~~~~~~~~~~~~~~~~
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we don't have uint128, then rb_int128_to_numeric emits a strict
aliasing warning:

    numeric.c:3641:39: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
    3641 |         return rb_uint128_to_numeric(*(rb_uint128_t*)&amp;n);
         |                                       ^~~~~~~~~~~~~~~~~
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix strict aliasing warning in ruby_swap128_int</title>
<updated>2025-12-06T16:31:41+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-12-06T15:37:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2e828dd98feeec5bab5ea85f0661638524004a01'/>
<id>2e828dd98feeec5bab5ea85f0661638524004a01</id>
<content type='text'>
The following warnings are emitted. We can use type punning to prevent
strict aliasing violations.

    io_buffer.c:1935:23: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
    1935 |     rb_uint128_t u = *(rb_uint128_t*)&amp;x;
         |                       ^~~~~~~~~~~~~~~~~
    io_buffer.c:1937:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
    1937 |     return *(rb_int128_t*)&amp;swapped;
         |
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following warnings are emitted. We can use type punning to prevent
strict aliasing violations.

    io_buffer.c:1935:23: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
    1935 |     rb_uint128_t u = *(rb_uint128_t*)&amp;x;
         |                       ^~~~~~~~~~~~~~~~~
    io_buffer.c:1937:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
    1937 |     return *(rb_int128_t*)&amp;swapped;
         |
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for `u128`, `U128`, `s128` and `S128` integers to `IO::Buffer`. (#15399)</title>
<updated>2025-12-06T02:55:32+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@shopify.com</email>
</author>
<published>2025-12-06T02:55:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a7dc53b91c8475323b34d5a332fdb25d190e277d'/>
<id>a7dc53b91c8475323b34d5a332fdb25d190e277d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix argument handling in `IO::Buffer#each_byte` (#15309)</title>
<updated>2025-11-27T02:10:43+00:00</updated>
<author>
<name>TOMITA Masahiro</name>
<email>tommy@tmtm.org</email>
</author>
<published>2025-11-27T02:10:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2e770cdf773d79327cfdeb8178a1cb9b340f4560'/>
<id>2e770cdf773d79327cfdeb8178a1cb9b340f4560</id>
<content type='text'>
The method incorrectly ignored its first argument and treated the second argument as offset and the third as count.
This change makes the first argument be treated as offset and the second as count.

Also fix incorrect block parameter in comments.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The method incorrectly ignored its first argument and treated the second argument as offset and the third as count.
This change makes the first argument be treated as offset and the second as count.

Also fix incorrect block parameter in comments.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix multiple bugs in `IO::Buffer.map` and update its documentation. (#15264)</title>
<updated>2025-11-21T00:30:42+00:00</updated>
<author>
<name>Alexander Bulancov</name>
<email>6594487+trinistr@users.noreply.github.com</email>
</author>
<published>2025-11-21T00:30:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aa9e15cb1ecb0de598f816e44a09e016aaa8ef5c'/>
<id>aa9e15cb1ecb0de598f816e44a09e016aaa8ef5c</id>
<content type='text'>
- Buffer's size did not account for offset when mapping the file, leading to possible crashes.
- Size and offset were not checked properly, leading to many situations raising EINVAL errors with generic messages.
- Documentation was wrong.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Buffer's size did not account for offset when mapping the file, leading to possible crashes.
- Size and offset were not checked properly, leading to many situations raising EINVAL errors with generic messages.
- Documentation was wrong.</pre>
</div>
</content>
</entry>
</feed>
