[SERVER-20266] Use ConstDataCursor to read buffer in Checksum::gen Created: 02/Sep/15 Updated: 05/Feb/16 Resolved: 22/Jan/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Portability |
| Affects Version/s: | 3.1.7 |
| Fix Version/s: | 3.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Bryan Chan | Assignee: | Tess Avitabile (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Sprint: | Platforms F (01/29/16) | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Checksum::gen computes a checksum for a given buffer by casting the content of the buffer into 64-bit numbers, 8 bytes at a time. The casts and subsequent operations yield incorrect results on a big-endian system. A simple fix would be to wrap the buffer in a ConstDataCursor and read the 64-bit numbers in little-endian order. |
| Comments |
| Comment by Githook User [ 22/Jan/16 ] | ||
|
Author: {u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}Message: | ||
| Comment by Mark Benvenuto [ 23/Dec/15 ] | ||
|
This is also failing on the ppc64 port, but for a different reason.
|