Skip to content

Commit 77fd05c

Browse files
committed
gc/mmtk: avoid fn_addr_eq for MSRV 1.74
1 parent b4b34ce commit 77fd05c

7 files changed

+36
-6
lines changed

debian/patches/Fix-FTBFS-on-x32-misdetected-as-i386-or-amd64.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Updated by John Paul Adrian Glaubitz <[email protected]> on
1212
1 file changed, 3 insertions(+)
1313

1414
diff --git a/configure.ac b/configure.ac
15-
index 30e197b..7bedb37 100644
15+
index 5899f2a..5e9b168 100644
1616
--- a/configure.ac
1717
+++ b/configure.ac
1818
@@ -2690,6 +2690,9 @@ AS_CASE([$coroutine_type], [yes|''], [

debian/patches/Mark-Gemspec-reproducible-change-fixing-784225-too.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ Signed-off-by: Christian Hofstaedtler <[email protected]>
1212
1 file changed, 3 insertions(+), 1 deletion(-)
1313

1414
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
15-
index 8f353ae..095125f 100644
15+
index 0b905a7..a102e3c 100644
1616
--- a/lib/rubygems/specification.rb
1717
+++ b/lib/rubygems/specification.rb
18-
@@ -1711,7 +1711,9 @@ class Gem::Specification < Gem::BasicSpecification
18+
@@ -1709,7 +1709,9 @@ class Gem::Specification < Gem::BasicSpecification
1919
raise(Gem::InvalidSpecificationException,
2020
"invalid date format in specification: #{date.inspect}")
2121
end

debian/patches/TestProcess-disable-gems-to-disable-rubygems_integration.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ lets such test fail.
1111
1 file changed, 3 insertions(+), 3 deletions(-)
1212

1313
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
14-
index 6e8ba48..dfe47cd 100644
14+
index af72053..c4184b2 100644
1515
--- a/test/ruby/test_process.rb
1616
+++ b/test/ruby/test_process.rb
1717
@@ -292,7 +292,7 @@ class TestProcess < Test::Unit::TestCase

debian/patches/extract-gems-sequential-Keep-using-RUNRUBY.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Subject: extract-gems-sequential: Keep using RUNRUBY
1515
1 file changed, 1 insertion(+), 3 deletions(-)
1616

1717
diff --git a/common.mk b/common.mk
18-
index 0ea360c..9b34859 100644
18+
index 594b5da..0b2aa6a 100644
1919
--- a/common.mk
2020
+++ b/common.mk
2121
@@ -1537,7 +1537,7 @@ update-gems$(gnumake:yes=-sequential): PHONY
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From: Sorah Fukumori <[email protected]>
2+
Date: Sat, 26 Apr 2025 11:08:01 +0900
3+
Subject: gc/mmtk: avoid fn_addr_eq for MSRV 1.74
4+
5+
---
6+
gc/mmtk/src/abi.rs | 3 ++-
7+
1 file changed, 2 insertions(+), 1 deletion(-)
8+
9+
diff --git a/gc/mmtk/src/abi.rs b/gc/mmtk/src/abi.rs
10+
index fc9c899..011c496 100644
11+
--- a/gc/mmtk/src/abi.rs
12+
+++ b/gc/mmtk/src/abi.rs
13+
@@ -153,6 +153,7 @@ impl ObjectClosure {
14+
///
15+
/// Note that this function is not reentrant. Don't call this function in either `callback` or
16+
/// `f`.
17+
+ #[allow(unpredictable_function_pointer_comparisons)]
18+
pub fn set_temporarily_and_run_code<'env, T, F1, F2>(
19+
&mut self,
20+
mut visit_object: F1,
21+
@@ -163,7 +164,7 @@ impl ObjectClosure {
22+
F2: 'env + FnOnce() -> T,
23+
{
24+
debug_assert!(
25+
- std::ptr::fn_addr_eq(self.c_function, THE_UNREGISTERED_CLOSURE_FUNC),
26+
+ self.c_function == THE_UNREGISTERED_CLOSURE_FUNC,
27+
"set_temporarily_and_run_code is recursively called."
28+
);
29+
self.c_function = Self::c_function_registered::<F1>;

debian/patches/rbinstall-Disable-arch-dependent-file-isolation.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Reverts https://github.com/ruby/ruby/pull/10010
88
1 file changed, 6 insertions(+), 6 deletions(-)
99

1010
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
11-
index ebd76dc..105f0e8 100755
11+
index b194f2c..62cf5be9 100755
1212
--- a/tool/rbinstall.rb
1313
+++ b/tool/rbinstall.rb
1414
@@ -367,7 +367,7 @@ goruby_install_name = "go" + ruby_install_name

debian/patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ Ensure-Integer-GMP_VERSION-exists.patch
1212
gc-mmtk-keep-using-std-panic-PanicInfo-for-MSRV-1.74.patch
1313
TestReline-test_tty_amibuous_width-use-test_rubybin.patch
1414
rbinstall-Disable-arch-dependent-file-isolation.patch
15+
gc-mmtk-avoid-fn_addr_eq-for-MSRV-1.74.patch

0 commit comments

Comments
 (0)