<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/configure.ac, 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>Detect `clock_gettime` and `clock_getres` for winpthreads</title>
<updated>2025-06-05T23:33:30+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-05-12T05:16:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d946d65cea2468086932bb95d77ac2f93b9f67b9'/>
<id>d946d65cea2468086932bb95d77ac2f93b9f67b9</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) bcb3247072e6973d0f6b50ca5fed238d5824bd28: [Backport #20500]</title>
<updated>2024-10-20T05:19:52+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-10-20T05:19:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2fbae07c42f40ea43b4822e278cc92fb2415cb61'/>
<id>2fbae07c42f40ea43b4822e278cc92fb2415cb61</id>
<content type='text'>
	[Bug #19778] Pass additional include options to INCFLAGS in common.mk
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #19778] Pass additional include options to INCFLAGS in common.mk
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 5fa6ba9568e87e43e08a4daeba1572254c589fb1: [Backport #20500]</title>
<updated>2024-10-20T04:56:22+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-10-20T04:56:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f70e3254e067663e72e6d410370d231e4245e4f4'/>
<id>f70e3254e067663e72e6d410370d231e4245e4f4</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>Revert "merge revision(s) 5fa6ba9568e87e43e08a4daeba1572254c589fb1: [Backport #20500]"</title>
<updated>2024-07-15T13:09:30+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-07-15T13:09:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=db5201ffd531d07747de03c55c4cb1c0e9e5c5bf'/>
<id>db5201ffd531d07747de03c55c4cb1c0e9e5c5bf</id>
<content type='text'>
This reverts commit fc5b9ffad1b0710bd999521d0bf9631af6b762c2.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit fc5b9ffad1b0710bd999521d0bf9631af6b762c2.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 5fa6ba9568e87e43e08a4daeba1572254c589fb1: [Backport #20500]</title>
<updated>2024-07-15T12:31:23+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-07-15T12:31:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fc5b9ffad1b0710bd999521d0bf9631af6b762c2'/>
<id>fc5b9ffad1b0710bd999521d0bf9631af6b762c2</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>[Backport #11036 to 3.2] Add explicit compiler fence when pushing frames to ensure safe profiling</title>
<updated>2024-07-06T07:20:45+00:00</updated>
<author>
<name>Ivo Anjo</name>
<email>ivo.anjo@datadoghq.com</email>
</author>
<published>2024-06-21T10:48:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2a4469ea590e6719eb30e8b7aea7e147e3b82f75'/>
<id>2a4469ea590e6719eb30e8b7aea7e147e3b82f75</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.2 .

**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.2 .

**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-07-06T02:01:02+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-07-06T02:01:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5141d72fde2528721663ddbc0554ac81ddc0656f'/>
<id>5141d72fde2528721663ddbc0554ac81ddc0656f</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>Revert "merge revision(s) 18eaf0be905e3e251423b42d6f4e56b7cae1bc3b: [Backport #20494]"</title>
<updated>2024-06-18T13:47:12+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-06-18T13:47:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e308f47888cfb5c85344d030098932340b57147d'/>
<id>e308f47888cfb5c85344d030098932340b57147d</id>
<content type='text'>
This reverts commit ec30266267b2a063089b8ce7967203bcbadbdf4e.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit ec30266267b2a063089b8ce7967203bcbadbdf4e.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 18eaf0be905e3e251423b42d6f4e56b7cae1bc3b: [Backport #20494]</title>
<updated>2024-06-15T04:09:47+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-06-15T04:09:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ec30266267b2a063089b8ce7967203bcbadbdf4e'/>
<id>ec30266267b2a063089b8ce7967203bcbadbdf4e</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>merge revision(s) 665b4c5b2a31078d7db0173ad60daad0b463c1fd,642875e474b4e6a13770b1dbbc33d466ba5e0718,54b9b80b84760717aadb8bf67f638785ed895a58,361bce8d2c4c90a01eb3b7365a87dec0d93bb2b6: [Backport #19967]</title>
<updated>2024-02-24T15:23:21+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-02-24T15:23:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3960d894d98d20540e646a0d6c2186a2d676b96c'/>
<id>3960d894d98d20540e646a0d6c2186a2d676b96c</id>
<content type='text'>
	[Bug #19967] Reset `LIBPATHENV` env after started

	Not to affect other tools invoked as child processes.
	---
	 common.mk            | 3 ++-
	 template/Makefile.in | 3 +++
	 template/fake.rb.in  | 3 +++
	 tool/fake.rb         | 8 ++++++++
	 4 files changed, 16 insertions(+), 1 deletion(-)

	[Bug #19967] Revert "configure.ac: LIBPATHENV on macOS"

	This reverts commit 1961c786aab243b3eb60e7238224e87975d88056.  These
	environment variables should no longer propagate to child processes.
	---
	 configure.ac | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)

	[Bug #19967] Delete real path

	---
	 tool/fake.rb | 3 ++-
	 1 file changed, 2 insertions(+), 1 deletion(-)

	[Bug #19967] Ignore library before build

	---
	 tool/fake.rb | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #19967] Reset `LIBPATHENV` env after started

	Not to affect other tools invoked as child processes.
	---
	 common.mk            | 3 ++-
	 template/Makefile.in | 3 +++
	 template/fake.rb.in  | 3 +++
	 tool/fake.rb         | 8 ++++++++
	 4 files changed, 16 insertions(+), 1 deletion(-)

	[Bug #19967] Revert "configure.ac: LIBPATHENV on macOS"

	This reverts commit 1961c786aab243b3eb60e7238224e87975d88056.  These
	environment variables should no longer propagate to child processes.
	---
	 configure.ac | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)

	[Bug #19967] Delete real path

	---
	 tool/fake.rb | 3 ++-
	 1 file changed, 2 insertions(+), 1 deletion(-)

	[Bug #19967] Ignore library before build

	---
	 tool/fake.rb | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)
</pre>
</div>
</content>
</entry>
</feed>
