Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-50

Remove undefined behavior w.r.t. unaligned memory accesses from bson headers

      The BSON headers (and some others) currently read and write arbitrary memory locations casted to types with alignment requirements. This is undefined behavior, and is non-portable to some architectures.

      We should replace these unaligned accesses with suitable memcpy calls, and trust in compiler QoI to turn those memcpy calls into intrinsics when applicable on the target platform.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: