<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext, branch v3_2_5</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) fba8aff7af450e476e97b62385427dfa51850955, d8c6e91748871ab2287d7703347847fe18a292d2: [Backport #20592]</title>
<updated>2024-07-20T04:05:33+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-07-20T04:00:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3fe51aa26867159af574fac8eba7ae86a0b30971'/>
<id>3fe51aa26867159af574fac8eba7ae86a0b30971</id>
<content type='text'>
	[Bug #20592] Fix segfault when sending NULL to freeaddrinfo

	On alpine freeaddrinfo does not accept NULL pointer

	Fix dangling `else`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #20592] Fix segfault when sending NULL to freeaddrinfo

	On alpine freeaddrinfo does not accept NULL pointer

	Fix dangling `else`
</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>merge revision(s) ae8990aef098410ecc2b5f48fea9d7d171a3c5f6: [Backport #20183]</title>
<updated>2024-05-16T02:36:47+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-05-16T02:36:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2d686e1019414f6bbb7ccbfa897b7b665250743d'/>
<id>2d686e1019414f6bbb7ccbfa897b7b665250743d</id>
<content type='text'>
	Alias init functions

	The extension library has each initialization function named "Init_" +
	basename. If multiple extensions have the same base name (such as
	cgi/escape and erb/escape), the same function will be registered for
	both names.

	To fix this conflict, rename the initialization functions under sub
	directories using using parent names, when statically linking.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Alias init functions

	The extension library has each initialization function named "Init_" +
	basename. If multiple extensions have the same base name (such as
	cgi/escape and erb/escape), the same function will be registered for
	both names.

	To fix this conflict, rename the initialization functions under sub
	directories using using parent names, when statically linking.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) d2cd903c85f38f42c6aefc6d97a1558f74d8d9db:</title>
<updated>2024-03-10T10:12:31+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-03-10T10:12:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b12343c3b6c557b7e5668dcd8a9eab12fc9ee2c0'/>
<id>b12343c3b6c557b7e5668dcd8a9eab12fc9ee2c0</id>
<content type='text'>
	[ruby/openssl] pkey/ec: constify

	https://github.com/ruby/openssl/commit/6fb3499a7b
	---
	 ext/openssl/ossl_pkey_ec.c | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[ruby/openssl] pkey/ec: constify

	https://github.com/ruby/openssl/commit/6fb3499a7b
	---
	 ext/openssl/ossl_pkey_ec.c | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) b8a3f1bd456f92866c4a7bd83235f78c574784a8:</title>
<updated>2024-01-18T03:57:01+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-01-18T03:57:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=99c9aeef4b4417120e30b145cf98e1bc68a2a0de'/>
<id>99c9aeef4b4417120e30b145cf98e1bc68a2a0de</id>
<content type='text'>
	Fix crash in tracing object allocations

	ObjectSpace.trace_object_allocations_start could crash since it adds a
	TracePoint for when objects are freed. However, TracePoint could crash
	since it modifies st tables while inside the GC that is trying to free
	the object. This could cause a memory allocation to happen which would
	crash if it triggers another GC.

	See a crash log: http://ci.rvm.jp/results/trunk@ruby-sp1/4373707
	---
	 ext/objspace/depend           | 1 +
	 ext/objspace/object_tracing.c | 7 +++++++
	 gc.h                          | 4 ++--
	 3 files changed, 10 insertions(+), 2 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Fix crash in tracing object allocations

	ObjectSpace.trace_object_allocations_start could crash since it adds a
	TracePoint for when objects are freed. However, TracePoint could crash
	since it modifies st tables while inside the GC that is trying to free
	the object. This could cause a memory allocation to happen which would
	crash if it triggers another GC.

	See a crash log: http://ci.rvm.jp/results/trunk@ruby-sp1/4373707
	---
	 ext/objspace/depend           | 1 +
	 ext/objspace/object_tracing.c | 7 +++++++
	 gc.h                          | 4 ++--
	 3 files changed, 10 insertions(+), 2 deletions(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 051a874325c177e040301878069c2b28f5d06ce6: [Backport #20096]</title>
<updated>2024-01-18T02:53:29+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-01-18T02:53:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5dae6eb55e9785c8329708e55a49a280a344cdc1'/>
<id>5dae6eb55e9785c8329708e55a49a280a344cdc1</id>
<content type='text'>
	Fix memory overread in registry.rb

	The terminator is not actually getting filled in; we're simply passing
	(two) bytes of empty memory as the NUL terminator. This can lead to
	garbage characters getting written to registry values.

	Fix this by explicitly putting a WCHAR_NUL character into the string to
	be sent to the registry API, like we do in the MULTI_SZ case.

	[Bug #20096]
	---
	 ext/win32/lib/win32/registry.rb | 7 ++-----
	 1 file changed, 2 insertions(+), 5 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Fix memory overread in registry.rb

	The terminator is not actually getting filled in; we're simply passing
	(two) bytes of empty memory as the NUL terminator. This can lead to
	garbage characters getting written to registry values.

	Fix this by explicitly putting a WCHAR_NUL character into the string to
	be sent to the registry API, like we do in the MULTI_SZ case.

	[Bug #20096]
	---
	 ext/win32/lib/win32/registry.rb | 7 ++-----
	 1 file changed, 2 insertions(+), 5 deletions(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 6b66b5fdedb2c9a9ee48e290d57ca7f8d55e01a2: [Backport #19902]</title>
<updated>2023-09-30T04:51:18+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2023-09-30T04:51:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ddbab4f837460f070942e8127de9a9f1b9868fff'/>
<id>ddbab4f837460f070942e8127de9a9f1b9868fff</id>
<content type='text'>
	[Bug #19902] Update the coderange regarding the changed region

	---
	 ext/-test-/string/set_len.c       | 10 ++++++++++
	 string.c                          | 27 +++++++++++++++++++++++++++
	 test/-ext-/string/test_set_len.rb | 29 +++++++++++++++++++++++++++++
	 3 files changed, 66 insertions(+)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #19902] Update the coderange regarding the changed region

	---
	 ext/-test-/string/set_len.c       | 10 ++++++++++
	 string.c                          | 27 +++++++++++++++++++++++++++
	 test/-ext-/string/test_set_len.rb | 29 +++++++++++++++++++++++++++++
	 3 files changed, 66 insertions(+)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix cvar caching when class is cloned</title>
<updated>2023-07-01T05:17:30+00:00</updated>
<author>
<name>eileencodes</name>
<email>eileencodes@gmail.com</email>
</author>
<published>2023-02-07T20:46:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8a3d57971c99680d4baec84553247b9c6ee41080'/>
<id>8a3d57971c99680d4baec84553247b9c6ee41080</id>
<content type='text'>
The class variable cache that was added in
https://github.com/ruby/ruby/pull/4544 changed the behavior of class
variables on cloned classes. As reported when a class is cloned AND a
class variable was set, and the class variable was read from the
original class, reading a class variable from the cloned class would
return the value from the original class.

This was happening because the IC (inline cache) is stored on the ISEQ
which is shared between the original and cloned class, therefore they
share the cache too.

To fix this we are now storing the `cref` in the cache so that we can
check if it's equal to the current `cref`. If it's different we don't
want to read from the cache. If it's the same we do. Cloned classes
don't share the same cref with their original class.

This will need to be backported to 3.1 in addition to 3.2 since the bug
exists in both versions.

We also added a marking function which was missing.

Fixes [Bug #19379]

Co-authored-by: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The class variable cache that was added in
https://github.com/ruby/ruby/pull/4544 changed the behavior of class
variables on cloned classes. As reported when a class is cloned AND a
class variable was set, and the class variable was read from the
original class, reading a class variable from the cloned class would
return the value from the original class.

This was happening because the IC (inline cache) is stored on the ISEQ
which is shared between the original and cloned class, therefore they
share the cache too.

To fix this we are now storing the `cref` in the cache so that we can
check if it's equal to the current `cref`. If it's different we don't
want to read from the cache. If it's the same we do. Cloned classes
don't share the same cref with their original class.

This will need to be backported to 3.1 in addition to 3.2 since the bug
exists in both versions.

We also added a marking function which was missing.

Fixes [Bug #19379]

Co-authored-by: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) fad48fefe19cc282a5b209944244a3713359b47f: [Backport #19399]</title>
<updated>2023-02-07T04:46:36+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2023-02-07T04:46:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7246cd0081ec845e1407484fca10439e7868880b'/>
<id>7246cd0081ec845e1407484fca10439e7868880b</id>
<content type='text'>
	[Bug #19399] Parsing invalid heredoc inside block parameter

	Although this is of course invalid as Ruby code, allow to just parse
	and tokenize.
	---
	 ext/ripper/lib/ripper/lexer.rb |  2 +-
	 test/ripper/test_lexer.rb      | 12 ++++++++++++
	 2 files changed, 13 insertions(+), 1 deletion(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #19399] Parsing invalid heredoc inside block parameter

	Although this is of course invalid as Ruby code, allow to just parse
	and tokenize.
	---
	 ext/ripper/lib/ripper/lexer.rb |  2 +-
	 test/ripper/test_lexer.rb      | 12 ++++++++++++
	 2 files changed, 13 insertions(+), 1 deletion(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 21dced8b01823a991829b66ffdc8ffc635965c76: [Backport #19389]</title>
<updated>2023-01-31T02:08:50+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2023-01-31T02:08:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1689d8bb4843f92c1805e4a4bdd94049569198f4'/>
<id>1689d8bb4843f92c1805e4a4bdd94049569198f4</id>
<content type='text'>
	[ruby/stringio] [Bug #19389] Fix chomping with longer separator

	https://github.com/ruby/stringio/commit/eb322a9716
	---
	 ext/stringio/stringio.c        | 5 +++--
	 test/stringio/test_stringio.rb | 2 ++
	 2 files changed, 5 insertions(+), 2 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[ruby/stringio] [Bug #19389] Fix chomping with longer separator

	https://github.com/ruby/stringio/commit/eb322a9716
	---
	 ext/stringio/stringio.c        | 5 +++--
	 test/stringio/test_stringio.rb | 2 ++
	 2 files changed, 5 insertions(+), 2 deletions(-)
</pre>
</div>
</content>
</entry>
</feed>
