Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-1202

Avoid 64-bit integer overflow errors during Server::getInfo()

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Blocker - P1 Blocker - P1
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      MongoDB 3.6 and 32-bit PHP runtime

      A user in mongodb/mongo-php-driver#847 reported an exception calling Server::getInfo() on a 32-bit platform because the isMaster response included a 64-bit integer with an out-of-range value.

      As a diagnostic function, it would probably be helpful if we avoided such exceptions and instead downgraded 64-bit integers to strings. Server::getInfo() makes no promises about providing the exact isMaster response and there isn't a concern with data loss due to round-tripping document data (the reason we throw such exceptions), so I think it would be permissible to perform "lossy" decoding here.

      Assuming this requires a new BSON decoding mode/flag, we might also consider it for other instances where BSON decoding is invoked during a debug function.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: