Skip to content
DevMeme
2760 of 7435
Warren Buffett's Encounter with a 32-Bit Integer Limit
Bugs Post #3049, on May 7, 2021 in TG

Warren Buffett's Encounter with a 32-Bit Integer Limit

Description

A screenshot of a Twitter thread discussing a real-time stock market glitch. The main tweet by Steve Weis reads, 'Berkshire Hathaway just hit $429,496.7295 and now Warren Buffet is broke.' It includes a stock chart for Berkshire Hathaway (BRK.A) showing its price plummeting from over $426,000 to nearly zero. The visual joke is explained in the replies: Steve Weis comments, 'Classic Buffet Overflow attack,' a pun on 'Buffer Overflow.' Another reply from Thomas H. Ptacek clarifies, 'it's 32-bit integers, baby.' The humor originates from a real-world software bug where a system likely used a 32-bit unsigned integer to store stock prices (multiplied by a factor to handle decimals). When the price exceeded the maximum value for this data type (2^32 - 1, which is 4,294,967,295), an integer overflow occurred, causing the value to wrap around to a small number and triggering a reported crash. This is a highly relatable and amusing scenario for senior engineers who have dealt with data type limitations and their catastrophic consequences in legacy systems

Comments

41
Anonymous ★ Top Pick Some banks still measure risk with 32-bit integers. We're about one good market rally away from seeing the entire economy get a segmentation fault
  1. Anonymous ★ Top Pick

    Some banks still measure risk with 32-bit integers. We're about one good market rally away from seeing the entire economy get a segmentation fault

  2. Anonymous

    Turns out uint32 tops out at $429,496 - now Berkshire’s trading at $2k and the PM who called int64 “premature optimization” is paging SRE

  3. Anonymous

    The best part about this incident is that somewhere a senior engineer had to explain to Warren Buffett that his net worth temporarily went negative because someone stored a stock price in an unsigned 32-bit integer - proving that even billionaires can't escape the fundamental laws of computer science

  4. Anonymous

    When your financial system uses a 32-bit signed integer for stock prices and Berkshire Hathaway's share price finally exceeds $429,496.7295, triggering an integer overflow that wraps around to near-zero - proving that even Warren Buffett isn't immune to off-by-one errors in legacy trading systems. The real vulnerability here isn't in the code; it's in assuming stock prices would never need more than 32 bits. Classic case of 'it'll never happen' meeting 'narrator: it happened.'

  5. Anonymous

    Store prices as uint32 with scale=1e4 and BRK.A will do your chaos test for you - next sprint: DECIMAL(38,4) and a range check

  6. Anonymous

    BRK.A: the integration test for anyone storing USD as uint32 with 4 decimal places - hit 429,496.7295 and watch your quote service wrap to $2,003

  7. Anonymous

    The one buffer overflow where smashing the stack retires you richer, not with a segfault

  8. @deerspangle 5y

    Your watermark is covering the last tweet though

    1. @nkormakov 5y

      No watermark if someone needed, you’re welcome

  9. @deerspangle 5y

    "32 bit integers, baby" Is what it says, I think

  10. @Supuhstar 5y

    Buffet Overflow!! 😹

  11. @Daler_XYZ 5y

    Wtf is it? Idk. I know English, but Wtf is it? Can somebody understand it for me. Please???

    1. @lavolpenoire 5y

      Understand- it what you made to yourself If someone to you- he will EXPLAIN

      1. @Daler_XYZ 5y

        Thank you, now I know it, в общем understand понимать, explain объяснить

    2. @lavolpenoire 5y

      So, yes, you even don't know English for level of 5 year child

      1. @anyo822 5y

        yours is not that much better)

    3. @asoteric 5y

      a 32 bit "buffer" overflow broke mr "buffet"'s stock price the joke is that its almost the same word - a "buffet" overflow a buffer overflow is where youre representing a number with a specific amount of binary bits and if you run out of bits it does weird stuff depending on the system. it could go to zero, become negative, or whatever depending on the format its being interpreted by

      1. @Daler_XYZ 5y

        Thank you

  12. @gerseray 5y

    Вы нахуя на английском пишите?

    1. @Pifagorov_pirog 5y

      Potomu cto my iz anglii

    2. @RiedleroD 5y

      Please use English in this chat. warning 1/3 for @gerseray

    3. @Zaicol 5y

      Tak nado

      1. @RiedleroD 5y

        have you not seen my messages, mate? warning 1/3 for @Zaicol

  13. @gammapopolam 5y

    napishite na russkom pozhaluista ya niche ne ponel

    1. @theodolu 5y

      Idi nahuy

      1. @gammapopolam 5y

        toxic blin

    2. @PsLXd 5y

      You can just use goggle translate

    3. @RiedleroD 5y

      This is an English-only channel, please refrain from using Russian or any other non-English language. warning 1/3 for @gammapopolam

  14. @choke_hazard 5y

    The thing I can note on this channel is no one asking to write comments on their native language except russian retards

    1. @lirys 5y

      kicked africans and russians asses in a double😄

  15. @choke_hazard 5y

    Do some self-education guys. Stop behaving like cave africans

  16. @Agent1378 5y

    Is it because GameStop?

    1. @RiedleroD 5y

      this has literally nothing to do with gamestop. Search for "integer overflow" and you'll see what the meme is about.

      1. dev_meme 5y

        Just for some unexperienced with this matter: sometimes same 32bit integer value may be used to present part of number after dot. E.g. 16bit for value before dot and 16 for value after

        1. dev_meme 5y

          That makes processing of transactions for exchanges much faster

          1. @RiedleroD 5y

            and definitely safer than using floats for money… I've seen some shit, man.

            1. Deleted Account 5y

              woah, you are not anon now

              1. @RiedleroD 5y

                ye, admin disabled it for me :)

                1. Deleted Account 5y

                  no more amogus

                  1. @RiedleroD 5y

                    y e s m o r e A M O G U S

  17. @kennyotsu 5y

    Such a good meme

Use J and K for navigation