[ruby-cvs:71524] nagachika:r64432 (ruby_2_5): merge revision(s) 63549, 63551, 63554: [Backport #14805]

nagachika at ruby-lang.org nagachika at ruby-lang.org
Sat Aug 18 12:37:56 JST 2018


nagachika	2018-08-18 12:37:56 +0900 (Sat, 18 Aug 2018)

  New Revision: 64432

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64432

  Log:
    merge revision(s) 63549,63551,63554: [Backport #14805]
    
    memo->u3.cnt is long not int [Bug #14805]
    
    enum.c: mitigate overflows
    
    * enum.c (enum_count): convert counters to Integer as unsigned
      long, instead of long, to mitigate overflows.
      [ruby-core:87348] [Bug #14805]
    
    * enum.c (ary_inject_op): ditto.
    
    * enum.c (each_with_index_i): ditto, instead of int.
    
    * enum.c (find_index_i, find_index_iter_i): ditto, instead of
      unsigned int.
    
    enum.c: bignum counter
    
    * enum.c (imemo_count_up, imemo_count_value): promote the counter
      value to a bignum on overflow.  [Bug #14805]

  Modified directories:
    branches/ruby_2_5/
  Modified files:
    branches/ruby_2_5/enum.c
    branches/ruby_2_5/version.h


More information about the ruby-cvs mailing list