Integer overflow in Array#[]

e$B$3$s$P$s$O!"e(Bsheepman e$B$G$9!#e(B

integer overflow e$B4XO"$G$9!#$$$/$D$+$"$j$^$9$,J,$1$FEj9F$7$^$9!#e(B

e$B$D$.$N$h$&$K$9$k$He(B segv e$B$7$^$9!#e(B

$ ruby-1.8 -ve ‘p [1, 2, 3][1, 2**31-1][100000]’
ruby 1.8.6 (2007-09-01 patchlevel 5000) [i686-linux]
-e:1: [BUG] Segmentation fault
ruby 1.8.6 (2007-09-01) [i686-linux]

zsh: abort ruby-1.8 -ve ‘p [1, 2, 3][1, 2**31-1][100000]’

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs