ActionsLike0
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) about 3 years ago
- Related to Bug #18518: NoMemoryError + [FATAL] failed to allocate memory for twice 1 << large added
Updated by byroot (Jean Boussier) about 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) about 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
Updated by nagachika (Tomoyuki Chikanaga) about 3 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
Updated by usa (Usaku NAKAMURA) about 3 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
ActionsLike0