Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-195

bson_oid_generated_time returns garbage on systems where time_t is 64bits

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 0.8.1
    • 0.6, 0.7, 0.7.1
    • None
    • Ubuntu 12.04.1 LTS
      kernel: 3.2.0-25-virtual
      x86_64
    • Fully Compatible

    Description

      The bson_oid_generated_time function fills in the first 4 bytes of a time_t and returns it. However, time_t length is system dependent. On my mac, it's 32 bits, but on my Ubuntu EC2 machine, it's 64. So on Ubuntu, I'm getting nonsense. Works correctly if I cast the result to a 32 bit int, and then back to a time_t.

      Attachments

        Activity

          People

            gjmurakami Gary Murakami
            davidcrawford David Crawford
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: