[#8815] Segfault in libc strlen, via rb_str_new2 — "Sean E. Russell" <ser@...>

Howdy,

12 messages 2006/09/09
[#8817] Re: Segfault in libc strlen, via rb_str_new2 — Eric Hodel <drbrain@...7.net> 2006/09/09

On Sep 8, 2006, at 10:10 PM, Sean E. Russell wrote:

Re: Problem with latest array.c changes

From: "Kent Sibilev" <ksruby@...>
Date: 2006-09-27 01:33:24 UTC
List: ruby-core #8934
On 9/25/06, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
>
> Hi,
>
> In message "Re: Problem with latest array.c changes"
>     on Tue, 26 Sep 2006 00:24:36 +0900, "Kent Sibilev" <ksruby@gmail.com>
> writes:
>
> |This change
> |
> |Mon Sep 25 21:24:54 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>
> |
> |    * array.c (rb_ary_shift): should clear shifting top element.
> |      [ruby-talk:216055]
> |
> |    * array.c (rb_ary_shift): avoid creating shared object if array
> |      size is small.
> |
> |leads to
> |
> |irb(main):027:0> a = [:a] * 3
> |=> [:a, :a, :a]
> |irb(main):028:0> a
> |=> [:a, :a, :a]
> |irb(main):029:0> a.dup.shift
> |=> :a
> |irb(main):030:0> a
> |=> [:a, :a, true]
> |
> |This patch seems to fix it
>
> Ah, thank you for finding and fixing the bug.
>
>                                                         matz.
>
>

Shouldn't it be applied to ruby_1_8 branch too? Thanks.

-- 
Kent
---
http://www.datanoise.com

In This Thread

Prev Next