[SERVER-15174] Use DataView and DataCursor to implement BSON library Created: 08/Sep/14  Updated: 02/Oct/14  Resolved: 17/Sep/14

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 2.7.7

Type: Task Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 Description   

Currently, BufBuilder, BSONObjBuilder, and friends use dereferenced reinterpret_cast'ed pointers to read and write raw values into memory. This is undefined behavior in many cases.

Instead, we should use the new DataView and DataCursor methods to achieve portable implementations.



 Comments   
Comment by Githook User [ 24/Sep/14 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-15174 Fixup a few overlooked alignment/endian issues in BSON
Branch: master
https://github.com/mongodb/mongo/commit/f1418a12b5edaa3f056a92c0d4e0a38ea5dde171

Comment by Githook User [ 17/Sep/14 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-15174 Read and write externally visible data in little endian format
Branch: master
https://github.com/mongodb/mongo/commit/c776c66917b2698442093e65394051bbac81fafb

Comment by Githook User [ 17/Sep/14 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-15174 Use DataView and DataCursor in BSON library
Branch: master
https://github.com/mongodb/mongo/commit/8d57e37ff1808f82504081539f49db1e5cf84a19

Comment by Githook User [ 08/Sep/14 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-15174 Provide some improved semantics for data_cursor and data_view
Branch: master
https://github.com/mongodb/mongo/commit/09878cb3cb2ec6224824b5ebcf8747413e3802e8

Generated at Thu Feb 08 03:37:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.