mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Avoid crash on logging GC-ed ISeq
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									e45c9a40a2
								
							
						
					
					
						commit
						009a0a3870
					
				
					 1 changed files with 8 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -946,9 +946,14 @@ load_func_from_so(const char *so_file, const char *funcname, struct rb_mjit_unit
 | 
			
		|||
static void
 | 
			
		||||
print_jit_result(const char *result, const struct rb_mjit_unit *unit, const double duration, const char *c_file)
 | 
			
		||||
{
 | 
			
		||||
    verbose(1, "JIT %s (%.1fms): %s@%s:%d -> %s", result,
 | 
			
		||||
            duration, RSTRING_PTR(unit->iseq->body->location.label),
 | 
			
		||||
            RSTRING_PTR(rb_iseq_path(unit->iseq)), FIX2INT(unit->iseq->body->location.first_lineno), c_file);
 | 
			
		||||
    if (unit->iseq == NULL) {
 | 
			
		||||
        verbose(1, "JIT %s (%.1fms): (GCed) -> %s", result, duration, c_file);
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        verbose(1, "JIT %s (%.1fms): %s@%s:%d -> %s", result,
 | 
			
		||||
                duration, RSTRING_PTR(unit->iseq->body->location.label),
 | 
			
		||||
                RSTRING_PTR(rb_iseq_path(unit->iseq)), FIX2INT(unit->iseq->body->location.first_lineno), c_file);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifndef __clang__
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue