mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Assert in_gc >= 0 instead of guarding it (#3687)
This commit is contained in:
		
							parent
							
								
									7cf34cfaa3
								
							
						
					
					
						commit
						40bad72f31
					
				
				
				Notes:
				
					git
				
				2020-10-23 13:59:41 +09:00 
				
			
			Merged-By: k0kubun <takashikkbn@gmail.com>
					 1 changed files with 1 additions and 3 deletions
				
			
		
							
								
								
									
										4
									
								
								mjit.c
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								mjit.c
									
										
									
									
									
								
							|  | @ -109,9 +109,7 @@ mjit_gc_exit_hook(void) | |||
|         return; | ||||
|     CRITICAL_SECTION_START(4, "mjit_gc_exit_hook"); | ||||
|     in_gc--; | ||||
|     if (in_gc < 0) { // Don't allow underflow
 | ||||
|         in_gc = 0; | ||||
|     } | ||||
|     RUBY_ASSERT_ALWAYS(in_gc >= 0); | ||||
|     if (!in_gc) { | ||||
|         verbose(4, "Sending wakeup signal to workers after GC"); | ||||
|         rb_native_cond_broadcast(&mjit_gc_wakeup); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Takashi Kokubun
						Takashi Kokubun