mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	initialize VM postponed_job first. [Bug #15288]
* inits.c: call `Init_vm_postponed_job` first because postponed_job is used by transient heap. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									a74d08b957
								
							
						
					
					
						commit
						8634e62a62
					
				
					 2 changed files with 3 additions and 8 deletions
				
			
		
							
								
								
									
										1
									
								
								inits.c
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								inits.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -19,6 +19,7 @@ rb_call_inits(void)
 | 
			
		|||
#if USE_TRANSIENT_HEAP
 | 
			
		||||
    CALL(TransientHeap);
 | 
			
		||||
#endif
 | 
			
		||||
    CALL(vm_postponed_job);
 | 
			
		||||
    CALL(Method);
 | 
			
		||||
    CALL(RandomSeedCore);
 | 
			
		||||
    CALL(sym);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										10
									
								
								vm_trace.c
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								vm_trace.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1470,8 +1470,6 @@ tracepoint_stat_s(VALUE self)
 | 
			
		|||
    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)
 | 
			
		|||
    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 {
 | 
			
		|||
#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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue