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

XMLWordPrintableJSON

    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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 (Inactive)
            Reporter:
            Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: