mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	move an interrupt point.
`args_ptr` can be corrupted by interrupt handlers. Pointed by nagachika <https://ruby-trunk-changes.hatenablog.com/entry/ruby_trunk_changes_20191204>.
This commit is contained in:
		
							parent
							
								
									b40bb27e35
								
							
						
					
					
						commit
						ee57920008
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		
							
								
								
									
										2
									
								
								thread.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								thread.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -681,6 +681,7 @@ thread_do_start(rb_thread_t *th)
 | 
			
		|||
	th->ec->root_svar = Qfalse;
 | 
			
		||||
 | 
			
		||||
        EXEC_EVENT_HOOK(th->ec, RUBY_EVENT_THREAD_BEGIN, th->self, 0, 0, 0, Qundef);
 | 
			
		||||
        vm_check_ints_blocking(th->ec);
 | 
			
		||||
 | 
			
		||||
        if (args_len < 8) {
 | 
			
		||||
            /* free proc.args if the length is enough small */
 | 
			
		||||
| 
						 | 
				
			
			@ -693,7 +694,6 @@ thread_do_start(rb_thread_t *th)
 | 
			
		|||
        }
 | 
			
		||||
 | 
			
		||||
        rb_adjust_argv_kw_splat(&args_len, &args_ptr, &kw_splat);
 | 
			
		||||
        vm_check_ints_blocking(th->ec);
 | 
			
		||||
        th->value = rb_vm_invoke_proc(th->ec, proc,
 | 
			
		||||
                                      args_len, args_ptr,
 | 
			
		||||
                                      kw_splat, VM_BLOCK_HANDLER_NONE);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue