Backport #8513

assertion failed in rb_ary_modify

Added by Kazuhiro NISHIYAMA almost 2 years ago. Updated almost 2 years 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));                                        

の ARY_SET_CAPA が assertion failed になっている 282 行目で、ARY_SET_PTR は通っているので、共通している
assert(!ARY_EMBED_P(ary));
assert(!OBJ_FROZEN(ary));
は問題なくて
assert(!ARY_SHARED_P(ary));
でひっかかっているようです。

History

#1 Updated by Nobuyoshi Nakada almost 2 years 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 almost 2 years 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 almost 2 years 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 almost 2 years ago

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

#5 Updated by Usaku NAKAMURA almost 2 years ago

  • Status changed from Assigned to Rejected

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

Also available in: Atom PDF