<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/regint.h, 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>Win32: Drop support for older than MSVC 9.0/_MSC_VER 1500</title>
<updated>2025-11-19T02:03:42+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-12-09T05:58:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3dd39134cde1a5ecd3c5d3128afcabd3c95e5bea'/>
<id>3dd39134cde1a5ecd3c5d3128afcabd3c95e5bea</id>
<content type='text'>
Visual C++ 2008 (9.0):
- _MSC_VER: 1500
- MSVCRT_VERSION: 90
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Visual C++ 2008 (9.0):
- _MSC_VER: 1500
- MSVCRT_VERSION: 90
</pre>
</div>
</content>
</entry>
<entry>
<title>Win32: Drop support for older than MSVC 8.0/_MSC_VER 1400</title>
<updated>2025-11-19T02:03:42+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-12-09T05:56:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cdb9893c552f67a6065dcb165b2040d35c57aee3'/>
<id>cdb9893c552f67a6065dcb165b2040d35c57aee3</id>
<content type='text'>
Visual C++ 2005 (8.0):
- _MSC_VER: 1400
- MSVCRT_VERSION: 80
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Visual C++ 2005 (8.0):
- _MSC_VER: 1400
- MSVCRT_VERSION: 80
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove old code for BMH search</title>
<updated>2025-10-31T11:49:59+00:00</updated>
<author>
<name>K.Takata</name>
<email>kentkt@csc.jp</email>
</author>
<published>2019-01-29T09:59:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ba74fcd6e1079dd4c8482c56675ffa9d20fed7ac'/>
<id>ba74fcd6e1079dd4c8482c56675ffa9d20fed7ac</id>
<content type='text'>
Remove the code for Boyer-Moore-Horspool search.
Now we are using Sunday's quick search.

https://github.com/k-takata/Onigmo/commit/3d9072419a1578b742a422412d004fd8a54209fd
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the code for Boyer-Moore-Horspool search.
Now we are using Sunday's quick search.

https://github.com/k-takata/Onigmo/commit/3d9072419a1578b742a422412d004fd8a54209fd
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix memory leak in String#start_with? when regexp times out</title>
<updated>2024-07-26T12:42:38+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-07-25T19:28:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7464514ca5e825ada31522b63a33e02d62a0a248'/>
<id>7464514ca5e825ada31522b63a33e02d62a0a248</id>
<content type='text'>
[Bug #20653]

This commit refactors how Onigmo handles timeout. Instead of raising a
timeout error, onig_search will return a ONIGERR_TIMEOUT which the
caller can free memory, and then raise a timeout error.

This fixes a memory leak in String#start_with when the regexp times out.
For example:

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

    10.times do
      100.times do
        str.start_with?(regex)
      rescue
      end

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

Before:

    33216
    51936
    71152
    81728
    97152
    103248
    120384
    133392
    133520
    133616

After:

    14912
    15376
    15824
    15824
    16128
    16128
    16144
    16144
    16160
    16160
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #20653]

This commit refactors how Onigmo handles timeout. Instead of raising a
timeout error, onig_search will return a ONIGERR_TIMEOUT which the
caller can free memory, and then raise a timeout error.

This fixes a memory leak in String#start_with when the regexp times out.
For example:

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

    10.times do
      100.times do
        str.start_with?(regex)
      rescue
      end

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

Before:

    33216
    51936
    71152
    81728
    97152
    103248
    120384
    133392
    133520
    133616

After:

    14912
    15376
    15824
    15824
    16128
    16128
    16144
    16144
    16160
    16160
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix memory leak in stk_base when Regexp timeout</title>
<updated>2024-02-02T15:39:42+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-01-30T19:15:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1c120efe02d079b0a1dea573cf0fd7978d9cc857'/>
<id>1c120efe02d079b0a1dea573cf0fd7978d9cc857</id>
<content type='text'>
[Bug #20228]

If rb_reg_check_timeout raises a Regexp::TimeoutError, then the stk_base
will leak.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #20228]

If rb_reg_check_timeout raises a Regexp::TimeoutError, then the stk_base
will leak.
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimize regexp matching for look-around and atomic groups (#7931)</title>
<updated>2023-10-30T04:10:42+00:00</updated>
<author>
<name>Hiroya Fujinami</name>
<email>make.just.on@gmail.com</email>
</author>
<published>2023-10-30T04:10:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=34cb174800e1e41323807c99386641b688927adc'/>
<id>34cb174800e1e41323807c99386641b688927adc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Delay start of the match cache optimization (#7738)</title>
<updated>2023-05-04T04:15:51+00:00</updated>
<author>
<name>TSUYUSATO Kitsune</name>
<email>make.just.on@gmail.com</email>
</author>
<published>2023-05-04T04:15:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ac730d3e759207fd0ea7289815985ee867689b9c'/>
<id>ac730d3e759207fd0ea7289815985ee867689b9c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor `Regexp#match` cache implementation (#7724)</title>
<updated>2023-04-19T04:08:28+00:00</updated>
<author>
<name>TSUYUSATO Kitsune</name>
<email>make.just.on@gmail.com</email>
</author>
<published>2023-04-19T04:08:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a1c2c274eebcc2a5275b677ebf94a8dbff380770'/>
<id>a1c2c274eebcc2a5275b677ebf94a8dbff380770</id>
<content type='text'>
* Refactor Regexp#match cache implementation

Improved variable and function names
Fixed [Bug 19537] (Maybe fixed in https://github.com/ruby/ruby/pull/7694)

* Add a comment of the glossary for "match cache"

* Skip to reset match cache when no cache point on null check</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Refactor Regexp#match cache implementation

Improved variable and function names
Fixed [Bug 19537] (Maybe fixed in https://github.com/ruby/ruby/pull/7694)

* Add a comment of the glossary for "match cache"

* Skip to reset match cache when no cache point on null check</pre>
</div>
</content>
</entry>
<entry>
<title>Fix `PLATFORM_GET_INC`</title>
<updated>2023-04-16T08:45:27+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-04-16T08:45:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fac814c2dc31afef272b45392a7389ef0bfa3a4f'/>
<id>fac814c2dc31afef272b45392a7389ef0bfa3a4f</id>
<content type='text'>
On platforms where unaligned word access is not allowed, and if
`sizeof(val)` and `sizeof(type)` differ:

- `val` &gt; `type`, `val` will be a garbage.
- `val` &lt; `type`, outside `val` will be clobbered.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On platforms where unaligned word access is not allowed, and if
`sizeof(val)` and `sizeof(type)` differ:

- `val` &gt; `type`, `val` will be a garbage.
- `val` &lt; `type`, outside `val` will be clobbered.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use long instead of int</title>
<updated>2022-11-09T14:21:26+00:00</updated>
<author>
<name>TSUYUSATO Kitsune</name>
<email>make.just.on@gmail.com</email>
</author>
<published>2022-11-09T03:19:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=36ff0521c1e81f83bf050d428815ae7413960136'/>
<id>36ff0521c1e81f83bf050d428815ae7413960136</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
