<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/-test-, branch v3_3_11</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) 43dbb9a93f4de3f1170d7d18641c30e81cc08365, 2bb6fe3854e2a4854bb89bfce4eaaea9d848fd1b, 7c9dd0ecff61153b96473c6c51d5582e809da489: [Backport #21629]</title>
<updated>2025-10-08T13:56:02+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2025-10-08T13:55:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5a8d7642168f4ea0d9331fded3033c225bbc36c5'/>
<id>5a8d7642168f4ea0d9331fded3033c225bbc36c5</id>
<content type='text'>
	[PATCH] [Bug #21629] Enable `nonstring` attribute on clang 21

	[PATCH] [Bug #21629] Initialize `struct RString`

	[PATCH] [Bug #21629] Initialize `struct RArray`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[PATCH] [Bug #21629] Enable `nonstring` attribute on clang 21

	[PATCH] [Bug #21629] Initialize `struct RString`

	[PATCH] [Bug #21629] Initialize `struct RArray`
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 7e4b1f8e1935a10df3c41ee60ca0987d73281126: [Backport #20322]</title>
<updated>2024-05-29T18:07:07+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-05-29T18:07:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=548c7cb9f517dcb8029bd9698187c81819e08edd'/>
<id>548c7cb9f517dcb8029bd9698187c81819e08edd</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>stop warnings from running the test case requiring .so twice</title>
<updated>2023-12-15T02:09:31+00:00</updated>
<author>
<name>Satoshi Tagomori</name>
<email>tagomoris@gmail.com</email>
</author>
<published>2023-12-15T01:38:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b98bd10f255d0afe33ba3c4410dd2c05c61695fb'/>
<id>b98bd10f255d0afe33ba3c4410dd2c05c61695fb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>rb_ext_resolve_symbol: C API to resolve and return externed symbols [Feature #20005]</title>
<updated>2023-12-14T08:39:42+00:00</updated>
<author>
<name>Satoshi Tagomori</name>
<email>tagomoris@gmail.com</email>
</author>
<published>2023-12-08T06:06:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e51f9e9f75cc1dde9234836fa92077d71b3c5141'/>
<id>e51f9e9f75cc1dde9234836fa92077d71b3c5141</id>
<content type='text'>
This is a C API for extensions to resolve and get function symbols of other extensions.
Extensions can check the expected symbol is correctly loaded and accessible, and
use it if it is available.
Otherwise, extensions can raise their own error to guide users to setup their
environments correctly and what's missing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a C API for extensions to resolve and get function symbols of other extensions.
Extensions can check the expected symbol is correctly loaded and accessible, and
use it if it is available.
Otherwise, extensions can raise their own error to guide users to setup their
environments correctly and what's missing.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a test case for preregistering with different data</title>
<updated>2023-12-13T02:35:05+00:00</updated>
<author>
<name>KJ Tsanaktsidis</name>
<email>ktsanaktsidis@zendesk.com</email>
</author>
<published>2023-12-11T04:22:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a8d2d93aff8d50adc914dfc24c09cfe28643501b'/>
<id>a8d2d93aff8d50adc914dfc24c09cfe28643501b</id>
<content type='text'>
We want to make sure that if preregister is called with different data,
that the postponed job table is updated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We want to make sure that if preregister is called with different data,
that the postponed job table is updated.
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify implementation of tracepoint tests</title>
<updated>2023-12-13T02:35:05+00:00</updated>
<author>
<name>KJ Tsanaktsidis</name>
<email>ktsanaktsidis@zendesk.com</email>
</author>
<published>2023-12-11T04:09:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=15d14e2f396c10366902aefaca99ee73c10cd556'/>
<id>15d14e2f396c10366902aefaca99ee73c10cd556</id>
<content type='text'>
With the latest version of the postponed job patchset merged, we don't
actually need to go through the contortions of keeping the data in a
global variable; we can just update `data` with multiple calls to
rb_postponed_job_preregister.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the latest version of the postponed job patchset merged, we don't
actually need to go through the contortions of keeping the data in a
global variable; we can just update `data` with multiple calls to
rb_postponed_job_preregister.
</pre>
</div>
</content>
</entry>
<entry>
<title>add `flags` to `rb_postponed_job_preregister`</title>
<updated>2023-12-10T06:39:06+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2023-12-09T16:47:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c4c39082af3520cd96aefc2219a7037865f3f710'/>
<id>c4c39082af3520cd96aefc2219a7037865f3f710</id>
<content type='text'>
for future extensions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
for future extensions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Change the semantics of rb_postponed_job_register</title>
<updated>2023-12-10T06:00:37+00:00</updated>
<author>
<name>KJ Tsanaktsidis</name>
<email>kj@kjtsanaktsidis.id.au</email>
</author>
<published>2023-11-19T11:54:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f8effa209adb3ce050c100ffaffe6f3cc1508185'/>
<id>f8effa209adb3ce050c100ffaffe6f3cc1508185</id>
<content type='text'>
Our current implementation of rb_postponed_job_register suffers from
some safety issues that can lead to interpreter crashes (see bug #1991).
Essentially, the issue is that jobs can be called with the wrong
arguments.

We made two attempts to fix this whilst keeping the promised semantics,
but:
  * The first one involved masking/unmasking when flushing jobs, which
    was believed to be too expensive
  * The second one involved a lock-free, multi-producer, single-consumer
    ringbuffer, which was too complex

The critical insight behind this third solution is that essentially the
only user of these APIs are a) internal, or b) profiling gems.

For a), none of the usages actually require variable data; they will
work just fine with the preregistration interface.

For b), generally profiling gems only call a single callback with a
single piece of data (which is actually usually just zero) for the life
of the program. The ringbuffer is complex because it needs to support
multi-word inserts of job &amp; data (which can't be atomic); but nobody
actually even needs that functionality, really.

So, this comit:
  * Introduces a pre-registration API for jobs, with a GVL-requiring
    rb_postponed_job_prereigster, which returns a handle which can be
    used with an async-signal-safe rb_postponed_job_trigger.
  * Deprecates rb_postponed_job_register (and re-implements it on top of
    the preregister function for compatability)
  * Moves all the internal usages of postponed job register
    pre-registration
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Our current implementation of rb_postponed_job_register suffers from
some safety issues that can lead to interpreter crashes (see bug #1991).
Essentially, the issue is that jobs can be called with the wrong
arguments.

We made two attempts to fix this whilst keeping the promised semantics,
but:
  * The first one involved masking/unmasking when flushing jobs, which
    was believed to be too expensive
  * The second one involved a lock-free, multi-producer, single-consumer
    ringbuffer, which was too complex

The critical insight behind this third solution is that essentially the
only user of these APIs are a) internal, or b) profiling gems.

For a), none of the usages actually require variable data; they will
work just fine with the preregistration interface.

For b), generally profiling gems only call a single callback with a
single piece of data (which is actually usually just zero) for the life
of the program. The ringbuffer is complex because it needs to support
multi-word inserts of job &amp; data (which can't be atomic); but nobody
actually even needs that functionality, really.

So, this comit:
  * Introduces a pre-registration API for jobs, with a GVL-requiring
    rb_postponed_job_prereigster, which returns a handle which can be
    used with an async-signal-safe rb_postponed_job_trigger.
  * Deprecates rb_postponed_job_register (and re-implements it on top of
    the preregister function for compatability)
  * Moves all the internal usages of postponed job register
    pre-registration
</pre>
</div>
</content>
</entry>
<entry>
<title>Further fix the GVL instrumentation API</title>
<updated>2023-11-28T19:06:55+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>byroot@ruby-lang.org</email>
</author>
<published>2023-11-28T10:03:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=982641939cf709d22dbc060df57cbed31acd3b97'/>
<id>982641939cf709d22dbc060df57cbed31acd3b97</id>
<content type='text'>
Followup: https://github.com/ruby/ruby/pull/9029

[Bug #20019]

Some events still weren't triggered from the right place.

The test suite was also improved a bit more.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Followup: https://github.com/ruby/ruby/pull/9029

[Bug #20019]

Some events still weren't triggered from the right place.

The test suite was also improved a bit more.
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor and fix the GVL instrumentation API</title>
<updated>2023-11-27T16:37:57+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>byroot@ruby-lang.org</email>
</author>
<published>2023-11-24T12:18:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=23a7714343b372234972ef0dacf774d07fe65ced'/>
<id>23a7714343b372234972ef0dacf774d07fe65ced</id>
<content type='text'>
This entirely changes how it is tested. Rather than to use counters
we now record the timeline of events with associated threads which
makes it much easier to assert that certains events are only preceded
by a specific event, and makes it much easier to debug unexpected
timelines.

Co-Authored-By: Étienne Barrié &lt;etienne.barrie@gmail.com&gt;
Co-Authored-By: JP Camara &lt;jp@jpcamara.com&gt;
Co-Authored-By: John Hawthorn &lt;john@hawthorn.email&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This entirely changes how it is tested. Rather than to use counters
we now record the timeline of events with associated threads which
makes it much easier to assert that certains events are only preceded
by a specific event, and makes it much easier to debug unexpected
timelines.

Co-Authored-By: Étienne Barrié &lt;etienne.barrie@gmail.com&gt;
Co-Authored-By: JP Camara &lt;jp@jpcamara.com&gt;
Co-Authored-By: John Hawthorn &lt;john@hawthorn.email&gt;
</pre>
</div>
</content>
</entry>
</feed>
