| |
@@ -22,7 +22,7 @@
|
| |
index ef9327df1f..1c35856c44 100644
|
| |
--- a/gc.c
|
| |
+++ b/gc.c
|
| |
- @@ -10164,8 +10164,20 @@ gc_update_references(rb_objspace_t *objspace)
|
| |
+ @@ -10165,8 +10165,20 @@ gc_update_references(rb_objspace_t *objspace)
|
| |
gc_update_table_refs(objspace, finalizer_table);
|
| |
}
|
| |
|
| |
@@ -44,7 +44,7 @@
|
| |
{
|
| |
size_t i;
|
| |
rb_objspace_t *objspace = &rb_objspace;
|
| |
- @@ -10238,22 +10250,70 @@ heap_check_moved_i(void *vstart, void *vend, size_t stride, void *data)
|
| |
+ @@ -10239,22 +10251,70 @@ heap_check_moved_i(void *vstart, void *vend, size_t stride, void *data)
|
| |
return 0;
|
| |
}
|
| |
|
| |
@@ -120,7 +120,7 @@
|
| |
|
| |
RB_VM_LOCK_ENTER();
|
| |
{
|
| |
- @@ -10273,12 +10333,12 @@ gc_verify_compaction_references(rb_execution_context_t *ec, VALUE self, VALUE do
|
| |
+ @@ -10274,12 +10334,12 @@ gc_verify_compaction_references(rb_execution_context_t *ec, VALUE self, VALUE do
|
| |
}
|
| |
RB_VM_LOCK_LEAVE();
|
| |
|
| |
@@ -135,7 +135,7 @@
|
| |
}
|
| |
|
| |
VALUE
|
| |
- @@ -10739,8 +10799,18 @@ gc_disable(rb_execution_context_t *ec, VALUE _)
|
| |
+ @@ -10740,8 +10800,18 @@ gc_disable(rb_execution_context_t *ec, VALUE _)
|
| |
return rb_gc_disable();
|
| |
}
|
| |
|
| |
@@ -155,7 +155,7 @@
|
| |
{
|
| |
/* If not MinGW, Windows, or does not have mmap, we cannot use mprotect for
|
| |
* the read barrier, so we must disable automatic compaction. */
|
| |
- @@ -10754,8 +10824,14 @@ gc_set_auto_compact(rb_execution_context_t *ec, VALUE _, VALUE v)
|
| |
+ @@ -10755,8 +10825,14 @@ gc_set_auto_compact(rb_execution_context_t *ec, VALUE _, VALUE v)
|
| |
return v;
|
| |
}
|
| |
|
| |
@@ -171,7 +171,7 @@
|
| |
{
|
| |
return RBOOL(ruby_enable_autocompact);
|
| |
}
|
| |
- @@ -13617,6 +13693,11 @@ Init_GC(void)
|
| |
+ @@ -13656,6 +13732,11 @@ Init_GC(void)
|
| |
rb_define_singleton_method(rb_mGC, "malloc_allocated_size", gc_malloc_allocated_size, 0);
|
| |
rb_define_singleton_method(rb_mGC, "malloc_allocations", gc_malloc_allocations, 0);
|
| |
#endif
|
| |
@@ -305,7 +305,7 @@
|
| |
index 92ed76cf96..d71924846a 100644
|
| |
--- a/gc.c
|
| |
+++ b/gc.c
|
| |
- @@ -9438,6 +9438,7 @@ gc_move(rb_objspace_t *objspace, VALUE scan, VALUE free, size_t slot_size)
|
| |
+ @@ -9439,6 +9439,7 @@ gc_move(rb_objspace_t *objspace, VALUE scan, VALUE free, size_t slot_size)
|
| |
return (VALUE)src;
|
| |
}
|
| |
|
| |
@@ -313,7 +313,7 @@
|
| |
static int
|
| |
compare_free_slots(const void *left, const void *right, void *dummy)
|
| |
{
|
| |
- @@ -9485,6 +9486,7 @@ gc_sort_heap_by_empty_slots(rb_objspace_t *objspace)
|
| |
+ @@ -9486,6 +9487,7 @@ gc_sort_heap_by_empty_slots(rb_objspace_t *objspace)
|
| |
free(page_list);
|
| |
}
|
| |
}
|
| |
@@ -321,7 +321,7 @@
|
| |
|
| |
static void
|
| |
gc_ref_update_array(rb_objspace_t * objspace, VALUE v)
|
| |
- @@ -10164,6 +10166,7 @@ gc_update_references(rb_objspace_t *objspace)
|
| |
+ @@ -10165,6 +10167,7 @@ gc_update_references(rb_objspace_t *objspace)
|
| |
gc_update_table_refs(objspace, finalizer_table);
|
| |
}
|
| |
|
| |
@@ -329,7 +329,7 @@
|
| |
/*
|
| |
* call-seq:
|
| |
* GC.latest_compact_info -> {:considered=>{:T_CLASS=>11}, :moved=>{:T_CLASS=>11}}
|
| |
- @@ -10200,7 +10203,11 @@ gc_compact_stats(VALUE self)
|
| |
+ @@ -10201,7 +10204,11 @@ gc_compact_stats(VALUE self)
|
| |
|
| |
return h;
|
| |
}
|
| |
@@ -341,7 +341,7 @@
|
| |
static void
|
| |
root_obj_check_moved_i(const char *category, VALUE obj, void *data)
|
| |
{
|
| |
- @@ -10262,6 +10269,10 @@ heap_check_moved_i(void *vstart, void *vend, size_t stride, void *data)
|
| |
+ @@ -10263,6 +10270,10 @@ heap_check_moved_i(void *vstart, void *vend, size_t stride, void *data)
|
| |
*
|
| |
* This method is implementation specific and not expected to be implemented
|
| |
* in any implementation besides MRI.
|
| |
@@ -352,7 +352,7 @@
|
| |
*/
|
| |
static VALUE
|
| |
gc_compact(VALUE self)
|
| |
- @@ -10271,7 +10282,11 @@ gc_compact(VALUE self)
|
| |
+ @@ -10272,7 +10283,11 @@ gc_compact(VALUE self)
|
| |
|
| |
return gc_compact_stats(self);
|
| |
}
|
| |
@@ -364,7 +364,7 @@
|
| |
/*
|
| |
* call-seq:
|
| |
* GC.verify_compaction_references(toward: nil, double_heap: false) -> hash
|
| |
- @@ -10340,6 +10355,9 @@ gc_verify_compaction_references(int argc, VALUE *argv, VALUE self)
|
| |
+ @@ -10341,6 +10356,9 @@ gc_verify_compaction_references(int argc, VALUE *argv, VALUE self)
|
| |
|
| |
return gc_compact_stats(self);
|
| |
}
|
| |
@@ -374,7 +374,7 @@
|
| |
|
| |
VALUE
|
| |
rb_gc_start(void)
|
| |
- @@ -10799,6 +10817,7 @@ gc_disable(rb_execution_context_t *ec, VALUE _)
|
| |
+ @@ -10800,6 +10818,7 @@ gc_disable(rb_execution_context_t *ec, VALUE _)
|
| |
return rb_gc_disable();
|
| |
}
|
| |
|
| |
@@ -382,7 +382,7 @@
|
| |
/*
|
| |
* call-seq:
|
| |
* GC.auto_compact = flag
|
| |
- @@ -10814,16 +10833,15 @@ gc_set_auto_compact(VALUE _, VALUE v)
|
| |
+ @@ -10815,16 +10834,15 @@ gc_set_auto_compact(VALUE _, VALUE v)
|
| |
{
|
| |
/* If not MinGW, Windows, or does not have mmap, we cannot use mprotect for
|
| |
* the read barrier, so we must disable automatic compaction. */
|
| |
@@ -403,7 +403,7 @@
|
| |
/*
|
| |
* call-seq:
|
| |
* GC.auto_compact -> true or false
|
| |
- @@ -10835,6 +10853,9 @@ gc_get_auto_compact(VALUE _)
|
| |
+ @@ -10836,6 +10854,9 @@ gc_get_auto_compact(VALUE _)
|
| |
{
|
| |
return RBOOL(ruby_enable_autocompact);
|
| |
}
|
| |
Upgrade to latest Ruby 3.1 release in Fedora 37. This will be ported to F36 after this PR is merged.
CGI and timezone patches were deleted as they were backported and changes are present in Ruby 3.1.4.
This also brings a fix for rhbz#2178171, which describes bundler's failure to correctly resolve archful gem that restricts ruby version, to a archless (ruby platform) gem that gets built locally. However, the fix is a fusion of a PR and a Commit, from what I can tell, bundler still works correctly, but I never really personally cared about pre-built gems, so I haven't tested it in detail. On the other hand, bundler test suite passes, see logs from my local build: https://gist.github.com/jackorp/390e9d3c69934782aaa2fe5bb6af944f