[前][次][番号順一覧][スレッド一覧]

ruby-changes:66884

From: nagachika <ko1@a...>
Date: Sun, 25 Jul 2021 14:54:43 +0900 (JST)
Subject: [ruby-changes:66884] e2aaed044e (ruby_3_0): merge revision(s) 292230cbf926e9892596ea37fd4567f0c49ab73c:

https://git.ruby-lang.org/ruby.git/commit/?id=e2aaed044e

From e2aaed044e9775dde061ecc960b7afabe91e7c6f Mon Sep 17 00:00:00 2001
From: nagachika <nagachika@r...>
Date: Sun, 25 Jul 2021 14:51:32 +0900
Subject: merge revision(s) 292230cbf926e9892596ea37fd4567f0c49ab73c:

	Fixed leaked global symbols

	---
	 gc.c            | 14 +++++++++-----
	 vm_insnhelper.c |  7 ++++---
	 vm_insnhelper.h |  2 +-
	 vm_sync.c       |  4 ++--
	 vm_sync.h       |  6 ++++--
	 5 files changed, 20 insertions(+), 13 deletions(-)
---
 gc.c            | 14 +++++++++-----
 version.h       |  2 +-
 vm_insnhelper.c |  7 ++++---
 vm_insnhelper.h |  2 +-
 vm_sync.c       |  4 ++--
 vm_sync.h       |  6 ++++--
 6 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/gc.c b/gc.c
index 15faf4d..e5f152a 100644
--- a/gc.c
+++ b/gc.c
@@ -4636,7 +4636,7 @@ static void read_barrier_handler(intptr_t address) https://github.com/ruby/ruby/blob/trunk/gc.c#L4636
 }
 
 #if defined(_WIN32)
-LPTOP_LEVEL_EXCEPTION_FILTER old_handler;
+static LPTOP_LEVEL_EXCEPTION_FILTER old_handler;
 typedef void (*signal_handler)(int);
 static signal_handler old_sigsegv_handler;
 
@@ -4655,13 +4655,15 @@ static LONG WINAPI read_barrier_signal(EXCEPTION_POINTERS * info) https://github.com/ruby/ruby/blob/trunk/gc.c#L4655
     }
 }
 
-static void uninstall_handlers(void)
+static void
+uninstall_handlers(void)
 {
     signal(SIGSEGV, old_sigsegv_handler);
     SetUnhandledExceptionFilter(old_handler);
 }
 
-static void install_handlers(void)
+static void
+install_handlers(void)
 {
     /* Remove SEGV handler so that the Unhandled Exception Filter handles it */
     old_sigsegv_handler = signal(SIGSEGV, NULL);
@@ -4697,13 +4699,15 @@ read_barrier_signal(int sig, siginfo_t * info, void * data) https://github.com/ruby/ruby/blob/trunk/gc.c#L4699
     sigprocmask(SIG_SETMASK, &prev_set, NULL);
 }
 
-static void uninstall_handlers(void)
+static void
+uninstall_handlers(void)
 {
     sigaction(SIGBUS, &old_sigbus_handler, NULL);
     sigaction(SIGSEGV, &old_sigsegv_handler, NULL);
 }
 
-static void install_handlers(void)
+static void
+install_handlers(void)
 {
     struct sigaction action;
     memset(&action, 0, sizeof(struct sigaction));
diff --git a/version.h b/version.h
index 9d2f085..cab29f2 100644
--- a/version.h
+++ b/version.h
@@ -12,7 +12,7 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L12
 # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
 #define RUBY_VERSION_TEENY 3
 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 115
+#define RUBY_PATCHLEVEL 116
 
 #define RUBY_RELEASE_YEAR 2021
 #define RUBY_RELEASE_MONTH 7
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 74ab6ac..fc2c7f8 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -237,7 +237,7 @@ static bool vm_stack_canary_was_born = false; https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L237
 
 #ifndef MJIT_HEADER
 MJIT_FUNC_EXPORTED void
-vm_check_canary(const rb_execution_context_t *ec, VALUE *sp)
+rb_vm_check_canary(const rb_execution_context_t *ec, VALUE *sp)
 {
     const struct rb_control_frame_struct *reg_cfp = ec->cfp;
     const struct rb_iseq_struct *iseq;
@@ -284,6 +284,7 @@ vm_check_canary(const rb_execution_context_t *ec, VALUE *sp) https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L284
     rb_bug("see above.");
 }
 #endif
+#define vm_check_canary(ec, sp) rb_vm_check_canary(ec, sp)
 
 #else
 #define vm_check_canary(ec, sp)
@@ -5377,7 +5378,7 @@ vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp) https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L5378
 
 #if VM_CHECK_MODE > 0
 NORETURN( NOINLINE( COLDFUNC
-void vm_canary_is_found_dead(enum ruby_vminsn_type i, VALUE c)));
+void rb_vm_canary_is_found_dead(enum ruby_vminsn_type i, VALUE c)));
 
 void
 Init_vm_stack_canary(void)
@@ -5392,7 +5393,7 @@ Init_vm_stack_canary(void) https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L5393
 
 #ifndef MJIT_HEADER
 MJIT_FUNC_EXPORTED void
-vm_canary_is_found_dead(enum ruby_vminsn_type i, VALUE c)
+rb_vm_canary_is_found_dead(enum ruby_vminsn_type i, VALUE c)
 {
     /* Because a method has already been called, why not call
      * another one. */
diff --git a/vm_insnhelper.h b/vm_insnhelper.h
index 56c4b96..18e7056 100644
--- a/vm_insnhelper.h
+++ b/vm_insnhelper.h
@@ -153,7 +153,7 @@ CC_SET_FASTPATH(const struct rb_callcache *cc, vm_call_handler func, bool enable https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.h#L153
             *canary = Qfalse; /* cleanup */ \
         } \
         else { \
-            vm_canary_is_found_dead(insn, *canary); \
+            rb_vm_canary_is_found_dead(insn, *canary); \
         } \
     }
 #else
diff --git a/vm_sync.c b/vm_sync.c
index af20523..1ce8cad 100644
--- a/vm_sync.c
+++ b/vm_sync.c
@@ -14,7 +14,7 @@ vm_locked(rb_vm_t *vm) https://github.com/ruby/ruby/blob/trunk/vm_sync.c#L14
 
 #if RUBY_DEBUG > 0
 void
-ASSERT_vm_locking(void)
+RUBY_ASSERT_vm_locking(void)
 {
     if (rb_multi_ractor_p()) {
         rb_vm_t *vm = GET_VM();
@@ -23,7 +23,7 @@ ASSERT_vm_locking(void) https://github.com/ruby/ruby/blob/trunk/vm_sync.c#L23
 }
 
 void
-ASSERT_vm_unlocking(void)
+RUBY_ASSERT_vm_unlocking(void)
 {
     if (rb_multi_ractor_p()) {
         rb_vm_t *vm = GET_VM();
diff --git a/vm_sync.h b/vm_sync.h
index b8ebb3b..3dc75a1 100644
--- a/vm_sync.h
+++ b/vm_sync.h
@@ -126,8 +126,10 @@ rb_vm_lock_leave_cr(struct rb_ractor_struct *cr, unsigned int *levp, const char https://github.com/ruby/ruby/blob/trunk/vm_sync.h#L126
 #define RB_VM_LOCK_LEAVE_NO_BARRIER()    RB_VM_LOCK_LEAVE_LEV(&_lev); }
 
 #if RUBY_DEBUG > 0
-void ASSERT_vm_locking(void);
-void ASSERT_vm_unlocking(void);
+void RUBY_ASSERT_vm_locking(void);
+void RUBY_ASSERT_vm_unlocking(void);
+#define ASSERT_vm_locking() RUBY_ASSERT_vm_locking()
+#define ASSERT_vm_unlocking() RUBY_ASSERT_vm_unlocking()
 #else
 #define ASSERT_vm_locking()
 #define ASSERT_vm_unlocking()
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]