diff --git a/doc/jit/zjit.md b/doc/jit/zjit.md index 2b8bd640f1fca0..ebe5cc4f9bb7b3 100644 --- a/doc/jit/zjit.md +++ b/doc/jit/zjit.md @@ -365,7 +365,6 @@ Note that this disables profiling. To inject interpreter profiles into ZJIT, con ```bash ./miniruby --zjit --zjit-dump-hir -e "30.times { 1 + 1 }" ``` -``` ### Viewing HIR in Iongraph diff --git a/gc.c b/gc.c index 1d3f6fa6ed15be..e0757a20dd48f4 100644 --- a/gc.c +++ b/gc.c @@ -198,36 +198,6 @@ rb_gc_initialize_vm_context(struct rb_gc_vm_context *context) context->ec = GET_EC(); } -#if USE_MODULAR_GC -void -rb_gc_worker_thread_set_vm_context(struct rb_gc_vm_context *context) -{ - rb_native_mutex_lock(&context->lock); - - GC_ASSERT(rb_current_execution_context(false) == NULL); - -#ifdef RB_THREAD_LOCAL_SPECIFIER - rb_current_ec_set(context->ec); -#else - native_tls_set(ruby_current_ec_key, context->ec); -#endif -} - -void -rb_gc_worker_thread_unset_vm_context(struct rb_gc_vm_context *context) -{ - rb_native_mutex_unlock(&context->lock); - - GC_ASSERT(rb_current_execution_context(true) == context->ec); - -#ifdef RB_THREAD_LOCAL_SPECIFIER - rb_current_ec_set(NULL); -#else - native_tls_set(ruby_current_ec_key, NULL); -#endif -} -#endif - bool rb_gc_event_hook_required_p(rb_event_flag_t event) { diff --git a/gc/gc.h b/gc/gc.h index 31ce736778d295..2809c7a128b824 100644 --- a/gc/gc.h +++ b/gc/gc.h @@ -101,8 +101,6 @@ MODULAR_GC_FN bool rb_gc_obj_needs_cleanup_p(VALUE obj); MODULAR_GC_FN bool rb_gc_event_hook_required_p(rb_event_flag_t event); MODULAR_GC_FN void *rb_gc_get_ractor_newobj_cache(void); MODULAR_GC_FN void rb_gc_initialize_vm_context(struct rb_gc_vm_context *context); -MODULAR_GC_FN void rb_gc_worker_thread_set_vm_context(struct rb_gc_vm_context *context); -MODULAR_GC_FN void rb_gc_worker_thread_unset_vm_context(struct rb_gc_vm_context *context); MODULAR_GC_FN void rb_gc_move_obj_during_marking(VALUE from, VALUE to); MODULAR_GC_FN void rb_gc_print_backtrace(); #endif diff --git a/include/ruby/internal/attr/format.h b/include/ruby/internal/attr/format.h index b3488ee00a36aa..7feff1c84637ff 100644 --- a/include/ruby/internal/attr/format.h +++ b/include/ruby/internal/attr/format.h @@ -22,6 +22,10 @@ */ #include "ruby/internal/has/attribute.h" +#if defined(__MINGW32__) +#include /* for __MINGW_PRINTF_FORMAT */ +#endif + /** Wraps (or simulates) `__attribute__((format))` */ #if RBIMPL_HAS_ATTRIBUTE(format) # define RBIMPL_ATTR_FORMAT(x, y, z) __attribute__((__format__(x, y, z))) diff --git a/scheduler.c b/scheduler.c index c2f370a22aee4e..3205bb3bc9a7c3 100644 --- a/scheduler.c +++ b/scheduler.c @@ -1111,6 +1111,9 @@ VALUE rb_fiber_scheduler_blocking_operation_wait(VALUE scheduler, void* (*functi operation->data2 = NULL; operation->unblock_function = NULL; + // Ensure that the blocking operation remains visible until this point: + RB_GC_GUARD(blocking_operation); + // If the blocking operation was never executed, return Qundef to signal the caller to use rb_nogvl instead if (current_status == RB_FIBER_SCHEDULER_BLOCKING_OPERATION_STATUS_QUEUED) { return Qundef; diff --git a/shape.c b/shape.c index 2b4256e5f3068c..24f1394f6cd32f 100644 --- a/shape.c +++ b/shape.c @@ -1529,7 +1529,7 @@ Init_default_shapes(void) } if (heaps_count > SHAPE_ID_HEAP_INDEX_MAX) { - rb_bug("Init_default_shapes initialized with %lu heaps, only up to %u are supported", heaps_count, SHAPE_ID_HEAP_INDEX_MAX); + rb_bug("Init_default_shapes initialized with %zu heaps, only up to %u are supported", heaps_count, SHAPE_ID_HEAP_INDEX_MAX); } size_t index;