Backport #8513

assertion failed in rb_ary_modify

Added by Kazuhiro NISHIYAMA 11 months ago. Updated 10 months ago.

[ruby-dev:47418]
Status:Rejected
Priority:Normal
Assignee:Usaku NAKAMURA

Description

-DARRAY_DEBUG をつけていると rdoc の生成中に array.c:282 で assertion failed になります。

    else if (ARY_SHARED_NUM(shared) == 1 && len > (RARRAY_LEN(shared)>>1)) {          
        long shift = RARRAY_PTR(ary) - RARRAY_PTR(shared);                            
        ARY_SET_PTR(ary, RARRAY_PTR(shared));                                         
        ARY_SET_CAPA(ary, RARRAY_LEN(shared));                                        

の ARYSETCAPA が assertion failed になっている 282 行目で、ARYSETPTR は通っているので、共通している
assert(!ARYEMBEDP(ary));
assert(!OBJFROZEN(ary));
は問題なくて
assert(!ARY
SHARED_P(ary));
でひっかかっているようです。

History

#1 Updated by Nobuyoshi Nakada 10 months ago

  • Status changed from Assigned to Closed
  • Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN to 1.9.3: REQUIRED, 2.0.0: REQUIRED

r41245で直ったと思います。

#2 Updated by Yui NARUSE 10 months ago

  • Tracker changed from Bug to Backport
  • Project changed from ruby-trunk to Backport200
  • Category deleted (core)
  • Status changed from Closed to Assigned
  • Assignee changed from Nobuyoshi Nakada to Tomoyuki Chikanaga
  • Target version deleted (2.1.0)

#3 Updated by Tomoyuki Chikanaga 10 months ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r41323.
Kazuhiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 41245: [Backport #8513]

* array.c (FL_SET_EMBED): shared object is frozen even when get
  unshared.

* array.c (rb_ary_modify): ARY_SET_CAPA needs unshared array.

#4 Updated by Tomoyuki Chikanaga 10 months ago

  • Project changed from Backport200 to Backport93
  • Status changed from Closed to Assigned
  • Assignee changed from Tomoyuki Chikanaga to Usaku NAKAMURA

#5 Updated by Usaku NAKAMURA 10 months ago

  • Status changed from Assigned to Rejected

1.9.3には該当コードがないようです。

Also available in: Atom PDF