Skip to content

Commit 79aea63

Browse files
committed
Merge branch 'master' into dist/3.3/bookworm
2 parents f473dfd + 6babc93 commit 79aea63

6 files changed

+581
-0
lines changed

debian/changelog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
ruby3.3 (3.3.0-0nkmi2~dist) unstable; urgency=medium
2+
3+
* Early backport: https://github.com/ruby/ruby/pull/9457
4+
* Early backport: https://github.com/ruby/ruby/pull/9415
5+
* Early backport: https://bugs.ruby-lang.org/issues/20184 https://github.com/ruby/ruby/pull/9498
6+
* Early backport: https://bugs.ruby-lang.org/issues/20085 https://github.com/ruby/ruby/pull/9385
7+
8+
-- Sorah Fukumori <[email protected]> Wed, 17 Jan 2024 17:31:21 +0900
9+
110
ruby3.3 (3.3.0-0nkmi1~dist) unstable; urgency=medium
211

312
* Happy Ruby 3.3!
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From: Aaron Patterson <[email protected]>
2+
Date: Thu, 11 Jan 2024 16:05:21 -0800
3+
Subject: Handle mmap failures for redblack tree cache
4+
5+
The redblack tree cache is totally optional, so if we can't allocate
6+
room for the cache, then just pretend as if the cache is full if mmap
7+
fails
8+
---
9+
shape.c | 8 ++++++++
10+
1 file changed, 8 insertions(+)
11+
12+
diff --git a/shape.c b/shape.c
13+
index 4cd4acd..8d8314d 100644
14+
--- a/shape.c
15+
+++ b/shape.c
16+
@@ -1233,6 +1233,14 @@ Init_default_shapes(void)
17+
rb_shape_tree_ptr->shape_cache = (redblack_node_t *)mmap(NULL, rb_size_mul_or_raise(REDBLACK_CACHE_SIZE, sizeof(redblack_node_t), rb_eRuntimeError),
18+
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
19+
rb_shape_tree_ptr->cache_size = 0;
20+
+
21+
+ // If mmap fails, then give up on the redblack tree cache.
22+
+ // We set the cache size such that the redblack node allocators think
23+
+ // the cache is full.
24+
+ if (GET_SHAPE_TREE()->shape_cache == MAP_FAILED) {
25+
+ GET_SHAPE_TREE()->shape_cache = 0;
26+
+ GET_SHAPE_TREE()->cache_size = REDBLACK_CACHE_SIZE;
27+
+ }
28+
#endif
29+
30+
// Shapes by size pool
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From: Yuta Saito <[email protected]>
2+
Date: Wed, 27 Dec 2023 06:22:45 +0000
3+
Subject: Use consistent default options for `-mbranch-protection`
4+
5+
We need to use the same options for both C compiler and assembler
6+
when `-mbranch-protection` is guessed by configure. Otherwise,
7+
`coroutine/arm64/Context.{h,S}` will use incompatible PAC strategies.
8+
---
9+
configure.ac | 3 +++
10+
1 file changed, 3 insertions(+)
11+
12+
diff --git a/configure.ac b/configure.ac
13+
index e4f9cc1..a7b1c77 100644
14+
--- a/configure.ac
15+
+++ b/configure.ac
16+
@@ -830,7 +830,10 @@ AS_IF([test "$GCC" = yes], [
17+
AS_FOR(option, opt, [-mbranch-protection=pac-ret -msign-return-address=all], [
18+
RUBY_TRY_CFLAGS(option, [branch_protection=yes], [branch_protection=no])
19+
AS_IF([test "x$branch_protection" = xyes], [
20+
+ # C compiler and assembler must be consistent for -mbranch-protection
21+
+ # since they both check `__ARM_FEATURE_PAC_DEFAULT` definition.
22+
RUBY_APPEND_OPTION(XCFLAGS, option)
23+
+ RUBY_APPEND_OPTION(ASFLAGS, option)
24+
break
25+
])
26+
])

0 commit comments

Comments
 (0)