[CDRIVER-2957] Consider adding an option to disable all alignment specifiers Created: 11/Feb/19 Updated: 18/Jun/20 Resolved: 18/Jun/20 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libbson |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kevin Albertson | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Despite -DENABLE_EXTRA_ALIGNMENT=OFF being a general improvement over our default large alignment specifiers (bson_t aligned at 128 bytes), users still run into issues with the alignment specifiers (e.g. It seems tricky to get the alignment specifiers right in all situations. And I'm doubtful that we get any measurable performance improvements by changing alignment. I think we should:
|
| Comments |
| Comment by Kevin Albertson [ 30/Apr/20 ] |
|
Breaking ABI through the use of cmake options may be a bad practice. It increases the likelihood of multiple ABI incompatible versions of libbson being used. For example, if a user links libbson with alignment disabled, then links libfoo that statically links libbson with alignment enabled, runtime symbol resolution for libbson symbols could go to either library depending on the order of linking. If they're ABI incompatible, I believe this could cause a runtime crash. |