Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3737

v8 BinData corruption

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.1.0
    • Affects Version/s: 1.8.0-rc0, 1.8.0-rc1, 1.8.0-rc2, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.9.0, 1.9.1, 1.9.2, 2.0.0-rc0
    • Component/s: JavaScript
    • Environment:
      Linux cdc 3.0.0-cdc-07647-g250f8e3 #13 SMP Sun Jul 31 12:35:55 EDT 2011 x86_64 GNU/Linux
      AMD64
    • ALL

      Trying to insert the sha1 hash of 7800000000000000000000000000000000000000

      mongos> foo = new BinData(0,"eAAAAAAAAAAAAAAAAAAAAAAAAAA=")
      BinData(0,"eAAAAAAAAAAAAAAAAAAAAAAAAAA=")
      mongos> db.dhts.insert({_id:foo})
      mongos> db.dhts.find()

      { "_id" : BinData(0,"eAAAAAAAAAAAAAAAAAAAAAAAAAA=") }
        1. All good so far.
        2. Now trying to insert the sha1 hash of 8000000000000000000000000000000000000000

      mongos> foo = new BinData(0,"gAAAAAAAAAAAAAAAAAAAAAAAAAA=")
      BinData(0,"gAAAAAAAAAAAAAAAAAAAAAAAAAA=")
      mongos> db.dhts.insert({_id:foo})
      mongos> db.dhts.find()

      { "_id" : BinData(0,"eAAAAAAAAAAAAAAAAAAAAAAAAAA=") } { "_id" : BinData(0,"77+9AAAAAAAAAAAAAAAAAAAAAAA=") }
        1. Insertion has corrupted data.
        1. This is additionally present directly in the C++ driver
          obj.appendBinData("_id",20,BinDataGeneral,hash0);
          obj.appendBinData("_id",20,BinDataGeneral,hash1);
        1. Where hash0 is <80... and hash1 is >=80...

            Assignee:
            antoine Antoine Girbal
            Reporter:
            jason Jason Volk
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: