mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-lang/ruby: avoid UB with coroutines for 4.0.x
Define RB_THREAD_CURRENT_EC_NOINLINE to always make a function call to get the coroutine execution context. Without it, GCC 16's x86 CSE pass will (with TLS descriptors at least) cache the value. 971174054a26be0a4becbe7c67a7cc980158abf2 added the convenient macro in 4.0.0, so for older releases, we'll have to patch instead. Bug: https://bugs.ruby-lang.org/issues/20243 Bug: https://gcc.gnu.org/PR124995 Closes: https://bugs.gentoo.org/972696 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -209,6 +209,8 @@ src_configure() {
|
||||
append-flags -fno-strict-aliasing
|
||||
# Fails to link (gcc PR124865, gcc PR50676)
|
||||
filter-flags -flto-partition=cache
|
||||
# bug #972696
|
||||
append-cppflags -DRB_THREAD_CURRENT_EC_NOINLINE
|
||||
|
||||
# Workaround for bug #938302
|
||||
if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
|
||||
@@ -209,6 +209,8 @@ src_configure() {
|
||||
append-flags -fno-strict-aliasing
|
||||
# Fails to link (gcc PR124865, gcc PR50676)
|
||||
filter-flags -flto-partition=cache
|
||||
# bug #972696
|
||||
append-cppflags -DRB_THREAD_CURRENT_EC_NOINLINE
|
||||
|
||||
# Workaround for bug #938302
|
||||
if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
|
||||
|
||||
Reference in New Issue
Block a user