mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	string.c: fix NOFREE
* string.c (str_make_independent_expand): drop NOFREE flag after reallocation, static buffer is not pointed anymore. [ruby-core:65317] [Bug #10304] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									2f2f92b73e
								
							
						
					
					
						commit
						ef08f00541
					
				
					 2 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,9 @@
 | 
			
		|||
Mon Sep 29 22:54:39 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* string.c (str_make_independent_expand): drop NOFREE flag after
 | 
			
		||||
	  reallocation, static buffer is not pointed anymore.
 | 
			
		||||
	  [ruby-core:65317] [Bug #10304]
 | 
			
		||||
 | 
			
		||||
Sun Sep 28 23:59:17 2014  Kazuki Tsujimoto  <kazuki@callcc.net>
 | 
			
		||||
 | 
			
		||||
	* gc.c (rb_gcdebug_print_obj_condition): use RVALUE_REMEMBERED
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								string.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								string.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1577,7 +1577,7 @@ str_make_independent_expand(VALUE str, long expand)
 | 
			
		|||
	memcpy(ptr, RSTRING_PTR(str), len);
 | 
			
		||||
    }
 | 
			
		||||
    STR_SET_NOEMBED(str);
 | 
			
		||||
    FL_UNSET(str, STR_SHARED);
 | 
			
		||||
    FL_UNSET(str, STR_SHARED|STR_NOFREE);
 | 
			
		||||
    TERM_FILL(ptr + len, termlen);
 | 
			
		||||
    RSTRING(str)->as.heap.ptr = ptr;
 | 
			
		||||
    RSTRING(str)->as.heap.len = len;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue