[SERVER-7324] Inappropriate use of toHex( &number, 4 ) to display value in hex Created: 11/Oct/12 Updated: 11/Jul/16 Resolved: 21/Aug/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging, Usability |
| Affects Version/s: | 2.0.7, 2.2.0 |
| Fix Version/s: | 2.5.2 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Tad Marshall | Assignee: | Andrew Emil (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Participants: |
| Description |
|
There are some places in the code where we use the toHex() routine to display a number in hexadecimal. This function doesn't do that; it displays a sequence of hexadecimal digits representing the contents of a memory location, in the order that they occur in memory. This means that on little-endian machines (i.e. all machines that MongoDB runs on in shipping branches) all of these values are byte-swapped relative to the actual value represented in hexadecimal.
This should display as:
We should add a function for converting values to hexadecimal display strings and call it instead of toHex() when displaying numeric values. |
| Comments |
| Comment by auto [ 30/May/13 ] |
|
Author: {u'username': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: |
| Comment by auto [ 29/May/13 ] |
|
Author: {u'username': u'AndrewCEmil', u'name': u'AndrewCEmil', u'email': u'andrew.emil@10gen.com'}Message: |
| Comment by auto [ 29/May/13 ] |
|
Author: {u'username': u'AndrewCEmil', u'name': u'AndrewCEmil', u'email': u'andrew.emil@10gen.com'}Message: |