ruby-changes:53412
From: ko1 <ko1@a...>
Date: Thu, 8 Nov 2018 14:35:50 +0900 (JST)
Subject: [ruby-changes:53412] ko1:r65628 (trunk): initialize VM postponed_job first. [Bug #15288]
ko1 2018-11-08 14:35:46 +0900 (Thu, 08 Nov 2018) New Revision: 65628 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65628 Log: initialize VM postponed_job first. [Bug #15288] * inits.c: call `Init_vm_postponed_job` first because postponed_job is used by transient heap. Modified files: trunk/inits.c trunk/vm_trace.c Index: inits.c =================================================================== --- inits.c (revision 65627) +++ inits.c (revision 65628) @@ -19,6 +19,7 @@ rb_call_inits(void) https://github.com/ruby/ruby/blob/trunk/inits.c#L19 #if USE_TRANSIENT_HEAP CALL(TransientHeap); #endif + CALL(vm_postponed_job); CALL(Method); CALL(RandomSeedCore); CALL(sym); Index: vm_trace.c =================================================================== --- vm_trace.c (revision 65627) +++ vm_trace.c (revision 65628) @@ -1470,8 +1470,6 @@ tracepoint_stat_s(VALUE self) https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L1470 return stat; } -static void Init_postponed_job(void); - /* This function is called from inits.c */ void Init_vm_trace(void) @@ -1566,10 +1564,6 @@ Init_vm_trace(void) https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L1564 rb_define_method(rb_cTracePoint, "raised_exception", tracepoint_attr_raised_exception, 0); rb_define_singleton_method(rb_cTracePoint, "stat", tracepoint_stat_s, 0); - - /* initialized for postponed job */ - - Init_postponed_job(); } typedef struct rb_postponed_job_struct { @@ -1580,8 +1574,8 @@ typedef struct rb_postponed_job_struct { https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L1574 #define MAX_POSTPONED_JOB 1000 #define MAX_POSTPONED_JOB_SPECIAL_ADDITION 24 -static void -Init_postponed_job(void) +void +Init_vm_postponed_job(void) { rb_vm_t *vm = GET_VM(); vm->postponed_job_buffer = ALLOC_N(rb_postponed_job_t, MAX_POSTPONED_JOB); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/