Actions
Bug #9939
closedsegfault by modifying array during Array#combination
Description
$ ruby -e 'a = [*0..500]' -e 'a.combination(2) {|*,x| a.clear}'
-e:2: [BUG] Segmentation fault at 0x00000000000000
Updated by nobu (Nobuyoshi Nakada) over 10 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
Applied in changeset r46418.
array.c: combination on a shared copy
- array.c (rb_ary_combination): iterate on a shared copy, and use
array of indexes instead of array of chosen objects.
[ruby-core:63149] [Bug #9939]
Updated by nagachika (Tomoyuki Chikanaga) over 10 years ago
- Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE
r46417 and r46418 were backported into ruby_2_1
branch at r46808.
Updated by usa (Usaku NAKAMURA) over 10 years ago
- Backport changed from 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: DONE, 2.1: DONE
backported into ruby_2_0_0
at r47332.
Actions
Like0
Like0Like0Like0