<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/configure.ac, 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) bc2a8a002a6c41fc1b28e02e15e2fb2b72d1b66e, c26057ebafb23b063190d31d5b4d19a0e0a1306c: [Backport #21779]</title>
<updated>2026-03-24T05:49:12+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2026-03-24T05:24:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7cb33b6a88beda081c9fd56302ee403333ba4427'/>
<id>7cb33b6a88beda081c9fd56302ee403333ba4427</id>
<content type='text'>
	[Bug #21779] Uniquify `InitVM` functions as well as `Init`

	Avoid possible name conflict when `--with-static-linked-ext`.

	[Bug #21779] Do not export InitVM functions

	Fix ruby/io-console#105.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #21779] Uniquify `InitVM` functions as well as `Init`

	Avoid possible name conflict when `--with-static-linked-ext`.

	[Bug #21779] Do not export InitVM functions

	Fix ruby/io-console#105.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 3e47e7a499acd256be549935fcb559d3c82e556c, 46e4c8673747de96838d2c5dec37446d23d99d88:</title>
<updated>2025-05-17T06:41:00+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2025-05-17T06:41:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a3adc05a4e1f5c5d1cd95eee92da9693b23360bf'/>
<id>a3adc05a4e1f5c5d1cd95eee92da9693b23360bf</id>
<content type='text'>
	Fix redefinition of `clock_gettime` and `clock_getres`

	winpthreads-git 12.0.0.r720 provides `clock_gettime` and
	`clock_getres` as inline functions.

	Detect `clock_gettime` and `clock_getres` for winpthreads
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Fix redefinition of `clock_gettime` and `clock_getres`

	winpthreads-git 12.0.0.r720 provides `clock_gettime` and
	`clock_getres` as inline functions.

	Detect `clock_gettime` and `clock_getres` for winpthreads
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #20088] Fix ARCH_FLAG for cross compiling</title>
<updated>2024-07-29T02:55:48+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-12-27T03:37:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6d744837abc3f7f71a1f10c7ca399201f6f05e43'/>
<id>6d744837abc3f7f71a1f10c7ca399201f6f05e43</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Backport #11036] Add explicit compiler fence when pushing frames to ensure safe profiling (#11090)</title>
<updated>2024-07-03T16:56:00+00:00</updated>
<author>
<name>Ivo Anjo</name>
<email>ivo.anjo@datadoghq.com</email>
</author>
<published>2024-07-03T16:56:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b2be36ef3349ebdab5423ea3337c03bcc3319b60'/>
<id>b2be36ef3349ebdab5423ea3337c03bcc3319b60</id>
<content type='text'>
**What does this PR do?**

This PR tweaks the `vm_push_frame` function to add an explicit compiler
fence (`atomic_signal_fence`) to ensure profilers that use signals
to interrupt applications (stackprof, vernier, pf2, Datadog profiler)
can safely sample from the signal handler.

This is a backport of #11036 to Ruby 3.3 .

**Motivation:**

The `vm_push_frame` was specifically tweaked in
https://github.com/ruby/ruby/pull/3296 to initialize the a frame
before updating the `cfp` pointer.

But since there's nothing stopping the compiler from reordering
the initialization of a frame (`*cfp =`) with the update of the cfp
pointer (`ec-&gt;cfp = cfp`) we've been hesitant to rely on this on
the Datadog profiler.

In practice, after some experimentation + talking to folks, this
reordering does not seem to happen.

But since modern compilers have a way for us to exactly tell them
not to do the reordering (`atomic_signal_fence`), this seems even
better.

I've actually extracted `vm_push_frame` into the "Compiler Explorer"
website, which you can use to see the assembly output of this function
across many compilers and architectures: https://godbolt.org/z/3oxd1446K

On that link you can observe two things across many compilers:
1. The compilers are not reordering the writes
2. The barrier does not change the generated assembly output
   (== has no cost in practice)

**Additional Notes:**

The checks added in `configure.ac` define two new macros:
* `HAVE_STDATOMIC_H`
* `HAVE_DECL_ATOMIC_SIGNAL_FENCE`

Since Ruby generates an arch-specific `config.h` header with
these macros upon installation, this can be used by profilers
and other libraries to test if Ruby was compiled with the fence enabled.

**How to test the change?**

As I mentioned above, you can check https://godbolt.org/z/3oxd1446K
to confirm the compiled output of `vm_push_frame` does not change
in most compilers (at least all that I've checked on that site).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
**What does this PR do?**

This PR tweaks the `vm_push_frame` function to add an explicit compiler
fence (`atomic_signal_fence`) to ensure profilers that use signals
to interrupt applications (stackprof, vernier, pf2, Datadog profiler)
can safely sample from the signal handler.

This is a backport of #11036 to Ruby 3.3 .

**Motivation:**

The `vm_push_frame` was specifically tweaked in
https://github.com/ruby/ruby/pull/3296 to initialize the a frame
before updating the `cfp` pointer.

But since there's nothing stopping the compiler from reordering
the initialization of a frame (`*cfp =`) with the update of the cfp
pointer (`ec-&gt;cfp = cfp`) we've been hesitant to rely on this on
the Datadog profiler.

In practice, after some experimentation + talking to folks, this
reordering does not seem to happen.

But since modern compilers have a way for us to exactly tell them
not to do the reordering (`atomic_signal_fence`), this seems even
better.

I've actually extracted `vm_push_frame` into the "Compiler Explorer"
website, which you can use to see the assembly output of this function
across many compilers and architectures: https://godbolt.org/z/3oxd1446K

On that link you can observe two things across many compilers:
1. The compilers are not reordering the writes
2. The barrier does not change the generated assembly output
   (== has no cost in practice)

**Additional Notes:**

The checks added in `configure.ac` define two new macros:
* `HAVE_STDATOMIC_H`
* `HAVE_DECL_ATOMIC_SIGNAL_FENCE`

Since Ruby generates an arch-specific `config.h` header with
these macros upon installation, this can be used by profilers
and other libraries to test if Ruby was compiled with the fence enabled.

**How to test the change?**

As I mentioned above, you can check https://godbolt.org/z/3oxd1446K
to confirm the compiled output of `vm_push_frame` does not change
in most compilers (at least all that I've checked on that site).</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 1e08a9f0e9058186db18f29efc6458c00f10a856: [Backport #20499]</title>
<updated>2024-06-11T18:11:23+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-06-11T18:11:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d3b139821294f56e6b31e28608c534d9f0920fc2'/>
<id>d3b139821294f56e6b31e28608c534d9f0920fc2</id>
<content type='text'>
	[Bug #20499] Use Xcode owned tools for Xcode clang

	Xcode has its own version tools that may be incompatible with genuine
	LLVM tools, use the tools in the same directory.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #20499] Use Xcode owned tools for Xcode clang

	Xcode has its own version tools that may be incompatible with genuine
	LLVM tools, use the tools in the same directory.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 5fa6ba9568e87e43e08a4daeba1572254c589fb1: [Backport #20500]</title>
<updated>2024-05-29T23:53:29+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-05-29T23:53:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a96233161a0e917b57c3c2cd9598d75d8b7721f5'/>
<id>a96233161a0e917b57c3c2cd9598d75d8b7721f5</id>
<content type='text'>
	[Bug #20500] Search non-default directories for jemalloc

	Co-Authored-by: lish82 (Hiroki Katagiri)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #20500] Search non-default directories for jemalloc

	Co-Authored-by: lish82 (Hiroki Katagiri)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 18eaf0be905e3e251423b42d6f4e56b7cae1bc3b: [Backport #20494]</title>
<updated>2024-05-29T23:18:29+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-05-29T23:18:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b3f2ccea5efb060e99d289b2272ddfe413e4f051'/>
<id>b3f2ccea5efb060e99d289b2272ddfe413e4f051</id>
<content type='text'>
	[Bug #20494] Search non-default directories for GMP

	Co-Authored-by: lish82 (Hiroki Katagiri)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #20494] Search non-default directories for GMP

	Co-Authored-by: lish82 (Hiroki Katagiri)
</pre>
</div>
</content>
</entry>
<entry>
<title>[Backport 3.3] [Bug #20085] Use consistent default options for `-mbranch-protection` (#9385)</title>
<updated>2024-02-05T14:50:20+00:00</updated>
<author>
<name>Yuta Saito</name>
<email>kateinoigakukun@gmail.com</email>
</author>
<published>2024-02-05T14:50:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7f97e3540ce448b501bcbee15afac5f94bb22dd9'/>
<id>7f97e3540ce448b501bcbee15afac5f94bb22dd9</id>
<content type='text'>
[Bug #20085] Use consistent default options for `-mbranch-protection`

We need to use the same options for both C compiler and assembler
when `-mbranch-protection` is guessed by configure. Otherwise,
`coroutine/arm64/Context.{h,S}` will use incompatible PAC strategies.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #20085] Use consistent default options for `-mbranch-protection`

We need to use the same options for both C compiler and assembler
when `-mbranch-protection` is guessed by configure. Otherwise,
`coroutine/arm64/Context.{h,S}` will use incompatible PAC strategies.</pre>
</div>
</content>
</entry>
<entry>
<title>KQueue support for M:N threads</title>
<updated>2023-12-20T07:23:38+00:00</updated>
<author>
<name>JP Camara</name>
<email>jp@jpcamara.com</email>
</author>
<published>2023-12-07T01:01:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8782e02138e6fe18b6c0dcc29bb877d6cdae57e5'/>
<id>8782e02138e6fe18b6c0dcc29bb877d6cdae57e5</id>
<content type='text'>
* Allows macOS users to use M:N threads (and technically FreeBSD, though it has not been verified on FreeBSD)

* Include sys/event.h header check for macros, and include sys/event.h when present

* Rename epoll_fd to more generic kq_fd (Kernel event Queue) for use by both epoll and kqueue

* MAP_STACK is not available on macOS so conditionall apply it to mmap flags

* Set fd to close on exec

* Log debug messages specific to kqueue and epoll on creation

* close_invalidate raises an error for the kqueue fd on child process fork. It's unclear rn if that's a bug, or if it's kqueue specific behavior

Use kq with rb_thread_wait_for_single_fd

* Only platforms with `USE_POLL` (linux) had changes applied to take advantage of kernel event queues. It needed to be applied to the `select` so that kqueue could be properly applied

* Clean up kqueue specific code and make sure only flags that were actually set are removed (or an error is raised)

* Also handle kevent specific errnos, since most don't apply from epoll to kqueue

* Use the more platform standard close-on-exec approach of `fcntl` and `FD_CLOEXEC`. The io-event gem uses `ioctl`, but fcntl seems to be the recommended choice. It is also what Go, Bun, and Libuv use

* We're making changes in this file anyways - may as well fix a couple spelling mistakes while here

Make sure FD_CLOEXEC carries over in dup

* Otherwise the kqueue descriptor should have FD_CLOEXEC, but doesn't and fails in assert_close_on_exec
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Allows macOS users to use M:N threads (and technically FreeBSD, though it has not been verified on FreeBSD)

* Include sys/event.h header check for macros, and include sys/event.h when present

* Rename epoll_fd to more generic kq_fd (Kernel event Queue) for use by both epoll and kqueue

* MAP_STACK is not available on macOS so conditionall apply it to mmap flags

* Set fd to close on exec

* Log debug messages specific to kqueue and epoll on creation

* close_invalidate raises an error for the kqueue fd on child process fork. It's unclear rn if that's a bug, or if it's kqueue specific behavior

Use kq with rb_thread_wait_for_single_fd

* Only platforms with `USE_POLL` (linux) had changes applied to take advantage of kernel event queues. It needed to be applied to the `select` so that kqueue could be properly applied

* Clean up kqueue specific code and make sure only flags that were actually set are removed (or an error is raised)

* Also handle kevent specific errnos, since most don't apply from epoll to kqueue

* Use the more platform standard close-on-exec approach of `fcntl` and `FD_CLOEXEC`. The io-event gem uses `ioctl`, but fcntl seems to be the recommended choice. It is also what Go, Bun, and Libuv use

* We're making changes in this file anyways - may as well fix a couple spelling mistakes while here

Make sure FD_CLOEXEC carries over in dup

* Otherwise the kqueue descriptor should have FD_CLOEXEC, but doesn't and fails in assert_close_on_exec
</pre>
</div>
</content>
</entry>
<entry>
<title>Add tool/missing-baseruby.bat, used when BASERUBY not available</title>
<updated>2023-12-20T05:30:47+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2023-12-20T05:30:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7dca6b53a995a9782026f726c291344b5b8e0ab2'/>
<id>7dca6b53a995a9782026f726c291344b5b8e0ab2</id>
<content type='text'>
Previously, the embedded semicolon in BASERUBY if BASERUBY is
not available breaks tarball builds without BASERUBY when using
OpenBSD make, due to the inability to escape MFLAGS correctly.
This moves the same BASERUBY code into a separate file, avoiding
the MFLAGS quoting issue.

BASERUBY must be passed to build-ext because it is required
by ripper since the introduction of lrama.

Fixes [Bug #19683]

Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the embedded semicolon in BASERUBY if BASERUBY is
not available breaks tarball builds without BASERUBY when using
OpenBSD make, due to the inability to escape MFLAGS correctly.
This moves the same BASERUBY code into a separate file, avoiding
the MFLAGS quoting issue.

BASERUBY must be passed to build-ext because it is required
by ripper since the introduction of lrama.

Fixes [Bug #19683]

Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;</pre>
</div>
</content>
</entry>
</feed>
