Shift overflow bug #3702

issue gavinandresen opened this issue on February 18, 2014
  1. gavinandresen commented at 3:42 PM on February 18, 2014: contributor

    clang is telling me:

    init.cpp:782:41: warning: signed shift result (0x100000000) requires 34 bits to represent, but 'int' only has 32 bits
    

    Git blame points the finger at:

    82e96006 src/init.cpp      (Philip Kaufmann          2014-02-16 22:00:12 +0100  780)     if (nTotalCache < (nMinDbCache << 20))
    
  2. gavinandresen assigned laanwj on Feb 18, 2014
  3. gavinandresen added the label Bug on Feb 18, 2014
  4. gavinandresen added the label Priority High on Feb 18, 2014
  5. gavinandresen added this to the milestone 0.9.0 on Feb 18, 2014
  6. jgarzik commented at 4:01 PM on February 18, 2014: contributor

    Definitely wants to be an int64_t or similar.

  7. laanwj referenced this in commit ad54a9b83f on Feb 18, 2014
  8. laanwj commented at 4:14 PM on February 18, 2014: member

    See #3703

  9. Diapolo commented at 5:34 PM on February 18, 2014: none

    As I said, I'm sorry... but I didn't introduce the shifts anyway.

  10. laanwj closed this on Feb 19, 2014

  11. MathyV referenced this in commit 07f9cf8013 on Oct 27, 2014
  12. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me