[SERVER-43148] third_party/murmurhash layering violation Created: 04/Sep/19 Updated: 29/Oct/23 Resolved: 01/Oct/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Billy Donahue | Assignee: | Billy Donahue |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Dev Tools 2019-09-23, Dev Tools 2019-10-07 |
| Participants: |
| Description |
|
third_party/murmurhash includes mongo/base and mongo/platform headers unnecessarily. It's doing this to access ConstDataView to get an unaligned endian swap. So we're left with unwritten rules about which headers base and ConstDataView can include, or we can fix the layering violation in MurmurHash. I think we should inline the unaligned load and endian-swapping code into murmurhash since that's a pretty standard operation, and it's strange for a third_party library to reach out to mongo for support headers anyway. I found this by adding stdx/unordered_map to base/init.h and getting a compile failure in murmurhash. |
| Comments |
| Comment by Githook User [ 01/Oct/19 ] |
|
Author: {'username': 'BillyDonahue', 'email': 'billy.donahue@mongodb.com', 'name': 'Billy Donahue'}Message:
|
| Comment by Billy Donahue [ 20/Sep/19 ] |
| Comment by Billy Donahue [ 20/Sep/19 ] |
|
A few more things that should be fixed at the same time while we're in there. Dos2unix the source files. Fix the unaligned writes. Hide undeclared symbols for helper functions in anonymous namespace. |