<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/include, branch v3_4_0_preview2</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Better handling of timeout in `rb_io_maybe_wait_*`. (#9531)</title>
<updated>2024-10-04T06:36:06+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2024-10-04T06:36:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c878843b2cb8fd54ebfaabd10b6334cf4d400208'/>
<id>c878843b2cb8fd54ebfaabd10b6334cf4d400208</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Clarify `rb_io_maybe_wait` behaviour. (#9527)</title>
<updated>2024-10-04T05:40:38+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2024-10-04T05:40:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=96d69d2df269bbf68bb0e378b2cd4af46bfd37a4'/>
<id>96d69d2df269bbf68bb0e378b2cd4af46bfd37a4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix rb_memsearch() document</title>
<updated>2024-09-24T06:12:48+00:00</updated>
<author>
<name>NAITOH Jun</name>
<email>naitoh@gmail.com</email>
</author>
<published>2024-09-13T21:36:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=373f679e48068ebead61a029922a48879c39bef5'/>
<id>373f679e48068ebead61a029922a48879c39bef5</id>
<content type='text'>
## Why?
The explanation of x and y is reversed.

https://github.com/ruby/ruby/blob/ddbd64400199fd408d23c85f9fb0d7f742ecf9e1/re.c#L251-L256
```
long
rb_memsearch(const void *x0, long m, const void *y0, long n, rb_encoding *enc)
{
    const unsigned char *x = x0, *y = y0;

    if (m &gt; n) return -1;
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
## Why?
The explanation of x and y is reversed.

https://github.com/ruby/ruby/blob/ddbd64400199fd408d23c85f9fb0d7f742ecf9e1/re.c#L251-L256
```
long
rb_memsearch(const void *x0, long m, const void *y0, long n, rb_encoding *enc)
{
    const unsigned char *x = x0, *y = y0;

    if (m &gt; n) return -1;
```
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Mention rb_io_fdopen() takes ownership of the FD</title>
<updated>2024-08-28T21:27:57+00:00</updated>
<author>
<name>Alan Wu</name>
<email>alanwu@ruby-lang.org</email>
</author>
<published>2024-08-28T21:27:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3fa5b4be195a84391e7cbde88b4c7d2e6fcf0e7c'/>
<id>3fa5b4be195a84391e7cbde88b4c7d2e6fcf0e7c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix sign-conversion warning</title>
<updated>2024-08-11T07:04:37+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-08-11T07:04:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1fd0a1b4ceef29a5aade5e1d896dca5b74258e6f'/>
<id>1fd0a1b4ceef29a5aade5e1d896dca5b74258e6f</id>
<content type='text'>
```
../../.././include/ruby/internal/special_consts.h:349:36: error: conversion to ‘VALUE’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Werror=sign-conversion]
  349 |     return RB_SPECIAL_CONST_P(obj) * RUBY_Qtrue;
      |            ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
```
../../.././include/ruby/internal/special_consts.h:349:36: error: conversion to ‘VALUE’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Werror=sign-conversion]
  349 |     return RB_SPECIAL_CONST_P(obj) * RUBY_Qtrue;
      |            ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix memory leak in Regexp capture group when timeout</title>
<updated>2024-07-25T13:23:49+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-07-24T19:16:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=10574857ce167869524b97ee862b610928f6272f'/>
<id>10574857ce167869524b97ee862b610928f6272f</id>
<content type='text'>
[Bug #20650]

The capture group allocates memory that is leaked when it times out.

For example:

    re = Regexp.new("^#{"(a*)" * 10_000}x$", timeout: 0.000001)
    str = "a" * 1000000 + "x"

    10.times do
      100.times do
        re =~ str
      rescue Regexp::TimeoutError
      end

      puts `ps -o rss= -p #{$$}`
    end

Before:

    34688
    56416
    78288
    100368
    120784
    140704
    161904
    183568
    204320
    224800

After:

    16288
    16288
    16880
    16896
    16912
    16928
    16944
    17184
    17184
    17200
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #20650]

The capture group allocates memory that is leaked when it times out.

For example:

    re = Regexp.new("^#{"(a*)" * 10_000}x$", timeout: 0.000001)
    str = "a" * 1000000 + "x"

    10.times do
      100.times do
        re =~ str
      rescue Regexp::TimeoutError
      end

      puts `ps -o rss= -p #{$$}`
    end

Before:

    34688
    56416
    78288
    100368
    120784
    140704
    161904
    183568
    204320
    224800

After:

    16288
    16288
    16880
    16896
    16912
    16928
    16944
    17184
    17184
    17200
</pre>
</div>
</content>
</entry>
<entry>
<title>Make rb_check_frozen_inline() static inline again</title>
<updated>2024-07-19T21:47:12+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2024-07-19T19:53:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8cf708d7b495f62d6239a49af25c362d0156e6aa'/>
<id>8cf708d7b495f62d6239a49af25c362d0156e6aa</id>
<content type='text'>
Since 730e3b2ce01915c4a98b79bb281b2c38a9ff1131
("Stop exposing `rb_str_chilled_p`"), we noticed a speed loss on a few
benchmarks that are string operations heavy. This is partially due to
routines no longer having the options to inline rb_check_frozen_inline()
in non-LTO builds. Make it an inlining candidate again to recover speed.

Testing this patch on my machine, the fannkuchredux benchmark gets a
1.15 speed-up with YJIT and 1.03 without YJIT.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since 730e3b2ce01915c4a98b79bb281b2c38a9ff1131
("Stop exposing `rb_str_chilled_p`"), we noticed a speed loss on a few
benchmarks that are string operations heavy. This is partially due to
routines no longer having the options to inline rb_check_frozen_inline()
in non-LTO builds. Make it an inlining candidate again to recover speed.

Testing this patch on my machine, the fannkuchredux benchmark gets a
1.15 speed-up with YJIT and 1.03 without YJIT.
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Note that rb_obj_freeze_inline() can raise NoMemoryError</title>
<updated>2024-07-17T14:25:20+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2024-07-16T22:21:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=99825a539f990dff7e0d7cae082ab195a82ffaa5'/>
<id>99825a539f990dff7e0d7cae082ab195a82ffaa5</id>
<content type='text'>
And move it back to a public header because Doxygen might not be
scanning the .c files.

[Feature #18776]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And move it back to a public header because Doxygen might not be
scanning the .c files.

[Feature #18776]
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] No more is rb_ary_freeze() an alias of rb_obj_freeze()</title>
<updated>2024-07-17T14:25:20+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2024-07-16T22:03:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cd428b490d635726e3d39ae8aa896bc41708cbc4'/>
<id>cd428b490d635726e3d39ae8aa896bc41708cbc4</id>
<content type='text'>
[Feature #20589]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Feature #20589]
</pre>
</div>
</content>
</entry>
<entry>
<title>give up USE_GC_MALLOC_OBJ_INFO_DETAILS</title>
<updated>2024-07-12T01:21:07+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2024-07-11T02:45:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fa6bf1da576430c1db0ff1d68fb9b5992a1d71c8'/>
<id>fa6bf1da576430c1db0ff1d68fb9b5992a1d71c8</id>
<content type='text'>
This feature is no longer possible under current design; now that our GC
is pluggable, we cannot assume what was achieved by this compiler flag
is always possble by the dynamically-loaded GC implementation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This feature is no longer possible under current design; now that our GC
is pluggable, we cannot assume what was achieved by this compiler flag
is always possble by the dynamically-loaded GC implementation.
</pre>
</div>
</content>
</entry>
</feed>
