<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/string.c, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[Bug #21629] Initialize `struct RString`</title>
<updated>2026-01-22T09:02:29+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-10-08T09:19:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=357d601e8b44b2d2b99ffaf05f6912c4c705c4e6'/>
<id>357d601e8b44b2d2b99ffaf05f6912c4c705c4e6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) d209e6f1c0a93ad3ce1cc64dd165a6b67672614d: [Backport #21715]</title>
<updated>2026-01-19T02:23:42+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2026-01-19T02:23:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2051ac34b72e95de6049eb2d226e5a55024c83c7'/>
<id>2051ac34b72e95de6049eb2d226e5a55024c83c7</id>
<content type='text'>
	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>
	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>Suppress gcc 15 unterminated-string-initialization warnings</title>
<updated>2025-07-24T05:39:20+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-04-30T09:35:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e26e8423b5b8a375a8fd6412a99eb6a8cc73cf2c'/>
<id>e26e8423b5b8a375a8fd6412a99eb6a8cc73cf2c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 02b70256b5171d4b85ea7eeab836d3d7cfb3dbfc, 6b4f8945d600168bf530d21395da8293fbd5e8ba: [Backport #20909]</title>
<updated>2024-11-30T09:34:32+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-11-30T09:34:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=937319126af801016d410226eb0cefc2c0b5ed32'/>
<id>937319126af801016d410226eb0cefc2c0b5ed32</id>
<content type='text'>
	Check negative integer underflow

	Many of Oniguruma functions need valid encoding strings
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Check negative integer underflow

	Many of Oniguruma functions need valid encoding strings
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 7e4b1f8e1935a10df3c41ee60ca0987d73281126: [Backport #20322]</title>
<updated>2024-07-15T04:40:01+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-07-15T04:40:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a6b7aad954680e23e7db81d69a7e8e44583bf8b4'/>
<id>a6b7aad954680e23e7db81d69a7e8e44583bf8b4</id>
<content type='text'>
	[Bug #20322] Fix rb_enc_interned_str_cstr null encoding

	The documentation for `rb_enc_interned_str_cstr` notes that `enc` can be
	a null pointer, but this currently causes a segmentation fault when
	trying to autoload the encoding. This commit fixes the issue by checking
	for NULL before calling `rb_enc_autoload`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #20322] Fix rb_enc_interned_str_cstr null encoding

	The documentation for `rb_enc_interned_str_cstr` notes that `enc` can be
	a null pointer, but this currently causes a segmentation fault when
	trying to autoload the encoding. This commit fixes the issue by checking
	for NULL before calling `rb_enc_autoload`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "merge revision(s) 5e0c17145131e073814c7e5b15227d0b4e73cabe: [Backport #20169]"</title>
<updated>2024-07-15T02:55:41+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-07-15T02:55:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0cb1e753cadb4cd1706ecf334e007bb246438577'/>
<id>0cb1e753cadb4cd1706ecf334e007bb246438577</id>
<content type='text'>
This reverts commit 6b73406833dd22e489114fa77c1c80c4b7af2ed0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 6b73406833dd22e489114fa77c1c80c4b7af2ed0.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "merge revision(s) e04146129ec6898dd6a9739dad2983c6e9b68056, d5080f6e8b77364483ff6727b1065e45e180f05d: [Backport #20292]"</title>
<updated>2024-07-15T02:08:50+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-07-15T02:08:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b5e554d03a0bd34f260e783e84f4d8a16de39a61'/>
<id>b5e554d03a0bd34f260e783e84f4d8a16de39a61</id>
<content type='text'>
This reverts commit a54c717c7a74b91a3cdf20742c355e3ea42052d1.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit a54c717c7a74b91a3cdf20742c355e3ea42052d1.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "follow-up for a54c717c7a74b91a3cdf20742c355e3ea42052d1."</title>
<updated>2024-07-15T02:07:31+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-07-15T02:07:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8051a6d3854687c008d69d3d198a16d0d1c5dac1'/>
<id>8051a6d3854687c008d69d3d198a16d0d1c5dac1</id>
<content type='text'>
This reverts commit 715633ba6e982dc5404abeafc5246c31af92ac10.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 715633ba6e982dc5404abeafc5246c31af92ac10.
</pre>
</div>
</content>
</entry>
<entry>
<title>follow-up for a54c717c7a74b91a3cdf20742c355e3ea42052d1.</title>
<updated>2024-07-15T01:41:21+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-07-15T01:41:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=715633ba6e982dc5404abeafc5246c31af92ac10'/>
<id>715633ba6e982dc5404abeafc5246c31af92ac10</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) e04146129ec6898dd6a9739dad2983c6e9b68056, d5080f6e8b77364483ff6727b1065e45e180f05d: [Backport #20292]</title>
<updated>2024-07-15T00:26:25+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-07-15T00:26:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a54c717c7a74b91a3cdf20742c355e3ea42052d1'/>
<id>a54c717c7a74b91a3cdf20742c355e3ea42052d1</id>
<content type='text'>
	[Bug #20292] Truncate embedded string to new capacity

	Fix -Wsign-compare on String#initialize
	MIME-Version: 1.0
	Content-Type: text/plain; charset=UTF-8
	Content-Transfer-Encoding: 8bit

	../string.c:1886:57: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
	 1886 |                 if (STR_EMBED_P(str)) RUBY_ASSERT(osize &lt;= str_embed_capa(str));
	      |                                                         ^~
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #20292] Truncate embedded string to new capacity

	Fix -Wsign-compare on String#initialize
	MIME-Version: 1.0
	Content-Type: text/plain; charset=UTF-8
	Content-Transfer-Encoding: 8bit

	../string.c:1886:57: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
	 1886 |                 if (STR_EMBED_P(str)) RUBY_ASSERT(osize &lt;= str_embed_capa(str));
	      |                                                         ^~
</pre>
</div>
</content>
</entry>
</feed>
