Actions
Bug #18517
closed0 << (2**40) is NoMemoryError but 0 << (2**80) is 0
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]
Description
I've been looking at Integer#{<<,>>} with RHS bignum and long and there are several issues.
This seems a clear bug though:
$ruby -e 'p 0 << (2**40)'
-e: failed to allocate memory (NoMemoryError)
$ ruby -e 'p 0 << (2**80)'
0
Updated by Eregon (Benoit Daloze) almost 3 years ago
- Related to Bug #18518: NoMemoryError + [FATAL] failed to allocate memory for twice 1 << large added
Updated by nobu (Nobuyoshi Nakada) almost 3 years ago
Updated by nobu (Nobuyoshi Nakada) almost 3 years ago
- Status changed from Open to Closed
Applied in changeset git|6a6227e0168b059c3ed34c9f0ace2e5dc2364221.
Shifting zero always results in zero [Bug #18517]
Updated by byroot (Jean Boussier) almost 3 years ago
- Backport changed from 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN to 2.6: UNKNOWN, 2.7: REQUIRED, 3.0: REQUIRED, 3.1: REQUIRED
Updated by naruse (Yui NARUSE) almost 3 years ago
- Backport changed from 2.6: UNKNOWN, 2.7: REQUIRED, 3.0: REQUIRED, 3.1: REQUIRED to 2.6: UNKNOWN, 2.7: REQUIRED, 3.0: REQUIRED, 3.1: DONE
ruby_3_1 1f17463dec2ab1535096cb56005a840eae4fea5b merged revision(s) 6a6227e0168b059c3ed34c9f0ace2e5dc2364221.
Updated by nagachika (Tomoyuki Chikanaga) over 2 years ago
- Backport changed from 2.6: UNKNOWN, 2.7: REQUIRED, 3.0: REQUIRED, 3.1: DONE to 2.6: UNKNOWN, 2.7: REQUIRED, 3.0: DONE, 3.1: DONE
ruby_3_0 9c2213f6695a16917dbe7b5a3a334116d6d8bbf6 merged revision(s) 6a6227e0168b059c3ed34c9f0ace2e5dc2364221.
Updated by usa (Usaku NAKAMURA) over 2 years ago
- Backport changed from 2.6: UNKNOWN, 2.7: REQUIRED, 3.0: DONE, 3.1: DONE to 2.6: UNKNOWN, 2.7: DONE, 3.0: DONE, 3.1: DONE
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0