<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/string.c, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>string.c: guard tmp in rb_str_format_m (GH-16280)</title>
<updated>2026-03-06T01:57:24+00:00</updated>
<author>
<name>ZHIJIE XIE</name>
<email>40601688+dummyx@users.noreply.github.com</email>
</author>
<published>2026-03-02T17:40:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=46f51cb3a26e5bfc92251e7971697a9c31bcab44'/>
<id>46f51cb3a26e5bfc92251e7971697a9c31bcab44</id>
<content type='text'>
[Bug #21931]

Keep tmp alive while RARRAY_CONST_PTR(tmp) is used by rb_str_format.

[alan: sunk the guard below usage]
Reviewed-by: Alan Wu &lt;XrXr@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #21931]

Keep tmp alive while RARRAY_CONST_PTR(tmp) is used by rb_str_format.

[alan: sunk the guard below usage]
Reviewed-by: Alan Wu &lt;XrXr@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) d209e6f1c0a93ad3ce1cc64dd165a6b67672614d: [Backport #21715]</title>
<updated>2026-01-21T07:52:39+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2026-01-19T02:25:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2bbc06e21d040ecbf4e32d3c4805685baf957d51'/>
<id>2bbc06e21d040ecbf4e32d3c4805685baf957d51</id>
<content type='text'>
	[PATCH] search_nonascii(): Replace UB pointer cast with memcpy

	Casting a pointer to create an unaligned one is undefined behavior in C
	standards. Use memcpy to express the unaligned load instead to play by
	the rules.

	Practically, this yields the same binary output in many situations
	while fixing the crash in [Bug #21715].
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[PATCH] search_nonascii(): Replace UB pointer cast with memcpy

	Casting a pointer to create an unaligned one is undefined behavior in C
	standards. Use memcpy to express the unaligned load instead to play by
	the rules.

	Practically, this yields the same binary output in many situations
	while fixing the crash in [Bug #21715].
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't modify fstrings in rb_str_tmp_frozen_no_embed_acquire (#15104)</title>
<updated>2025-11-08T03:44:56+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2025-11-08T03:44:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9e426489f00a1b7816e8c6f299daa6116c5f505d'/>
<id>9e426489f00a1b7816e8c6f299daa6116c5f505d</id>
<content type='text'>
[Bug #21671]</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #21671]</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 2bb6fe3854e2a4854bb89bfce4eaaea9d848fd1b: [Backport #21629]</title>
<updated>2025-10-08T23:50:58+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-10-08T23:50:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=18e176659e8afe402cab7d39972f2d56f2cf378f'/>
<id>18e176659e8afe402cab7d39972f2d56f2cf378f</id>
<content type='text'>
	[PATCH] [Bug #21629] Initialize `struct RString`

which appears to be missed in the previous commit for some reason.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[PATCH] [Bug #21629] Initialize `struct RString`

which appears to be missed in the previous commit for some reason.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) b42afa1dbcbb91e89852b3b3bc72484d7f0a5528, f1f0cc14cc7d3f9be35b203e5583f9224b1e2387, 543e3a1896ae2fe3b5b954f6497d261ab5663a15, ed2806117a0b76e4439ce1a061fae21d9e116d69, 46e4c8673747de96838d2c5dec37446d23d99d88: [Backport #21500]</title>
<updated>2025-07-14T21:50:56+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-07-14T21:50:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=596126ee5aa35a65bcaca60b92b5547ef1a9d2da'/>
<id>596126ee5aa35a65bcaca60b92b5547ef1a9d2da</id>
<content type='text'>
	Suppress gcc 15 unterminated-string-initialization warnings

	Separate `__has_attribute` from `defined(__has_attribute)`

	Fix Visual C warnings:
	```
	regenc.h(121): warning C4067: unexpected tokens following preprocessor directive - expected a newline
	```

	Cast up `int` instruction code to `VALUE`

	Fix Visual C warnings:
	```
	iseq.c(3793): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size
	iseq.c(3794): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size
	```

	Do not let files depend on a phony target

	Detect `clock_gettime` and `clock_getres` for winpthreads
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Suppress gcc 15 unterminated-string-initialization warnings

	Separate `__has_attribute` from `defined(__has_attribute)`

	Fix Visual C warnings:
	```
	regenc.h(121): warning C4067: unexpected tokens following preprocessor directive - expected a newline
	```

	Cast up `int` instruction code to `VALUE`

	Fix Visual C warnings:
	```
	iseq.c(3793): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size
	iseq.c(3794): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size
	```

	Do not let files depend on a phony target

	Detect `clock_gettime` and `clock_getres` for winpthreads
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) fa85d23ff4a02985ebfe0716b0ff768f5b4fe13d: [Backport #21380]</title>
<updated>2025-07-14T21:23:45+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-07-14T21:23:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fee92000fe96ac2dba0e87c5ed60c7440c8e2117'/>
<id>fee92000fe96ac2dba0e87c5ed60c7440c8e2117</id>
<content type='text'>
	[Bug #21380] Prohibit modification in String#split block

	Reported at https://hackerone.com/reports/3163876
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #21380] Prohibit modification in String#split block

	Reported at https://hackerone.com/reports/3163876
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a race condition with interned strings sweeping.</title>
<updated>2025-03-06T17:24:37+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-03-05T16:29:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=161cffb39970b147f92d779834a393b5637d6d00'/>
<id>161cffb39970b147f92d779834a393b5637d6d00</id>
<content type='text'>
[Bug #21172]

This fixes a rare CI failure.

The timeline of the race condition is:

- A `"foo" oid=1` string is interned.
- `"foo" oid=1` is no longer referenced and will be swept in the future.
- Another `"foo" oid=2` string is interned.
- `register_fstring` finds `"foo" oid=1`, but since it is about to be swept,
  removes it from `fstring_table` and insert `"foo" oid=2` instead.
- `"foo" oid=1` is swept, since it has the `RSTRING_FSTR` flag,
  a `st_delete` is issued in `fstring_table` which removes `"foo" oid=2`.

I don't know how to reproduce this bug consistently in a single test
case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #21172]

This fixes a rare CI failure.

The timeline of the race condition is:

- A `"foo" oid=1` string is interned.
- `"foo" oid=1` is no longer referenced and will be swept in the future.
- Another `"foo" oid=2` string is interned.
- `register_fstring` finds `"foo" oid=1`, but since it is about to be swept,
  removes it from `fstring_table` and insert `"foo" oid=2` instead.
- `"foo" oid=1` is swept, since it has the `RSTRING_FSTR` flag,
  a `st_delete` is issued in `fstring_table` which removes `"foo" oid=2`.

I don't know how to reproduce this bug consistently in a single test
case.
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] [Feature #20205] Document the new power of String#+@</title>
<updated>2024-12-13T19:25:32+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2024-12-13T18:41:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=880a90cf2e56f9782b578fd48088c184bf3952ac'/>
<id>880a90cf2e56f9782b578fd48088c184bf3952ac</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimize `rb_must_asciicompat`</title>
<updated>2024-11-27T13:50:07+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2024-11-27T09:32:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=26d020cb6ea98adb38b370cf49b8101292d6f193'/>
<id>26d020cb6ea98adb38b370cf49b8101292d6f193</id>
<content type='text'>
While profiling `strscan`, I noticed `rb_must_asciicompat` was quite
slow, as more than 5% of the benchmark was spent in it: https://share.firefox.dev/49bOcTn

By checking for the common 3 ASCII compatible encoding index first,
we can skip a lot of expensive operations in the happy path.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While profiling `strscan`, I noticed `rb_must_asciicompat` was quite
slow, as more than 5% of the benchmark was spent in it: https://share.firefox.dev/49bOcTn

By checking for the common 3 ASCII compatible encoding index first,
we can skip a lot of expensive operations in the happy path.
</pre>
</div>
</content>
</entry>
<entry>
<title>Many of Oniguruma functions need valid encoding strings</title>
<updated>2024-11-26T02:46:34+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-11-26T02:05:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6b4f8945d600168bf530d21395da8293fbd5e8ba'/>
<id>6b4f8945d600168bf530d21395da8293fbd5e8ba</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
