[CXX-23] Create a config.h header that captures the values of preprocessor defines to avoid ABI inconsistencies Created: 29/Jan/14  Updated: 04/May/14  Resolved: 07/Apr/14

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: None
Fix Version/s: legacy-0.8.0

Type: Improvement Priority: Critical - P2
Reporter: Andrew Morrow (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Right now, we pass options like -DMONGO_SSL when building the mongo client library. However, we don't record those in a config.h header that is included by the headers or installed.

Some of these defines, like MONGO_SSL or _DEBUG, can affect the size and layout of objects.

This means that clients of the library must pass the same definitions on their compilation line or risk subtle crashes and memory corruption.

We should generate a config.h header that captures the relevant defines and ensures that they are visible to the mongoclient headers when used by clients of the library.



 Comments   
Comment by Githook User [ 07/Apr/14 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: CXX-23 CXX-57 Create a config.h header for ODR affecting macros and create a meaningful version header
Branch: legacy
https://github.com/mongodb/mongo-cxx-driver/commit/45c3f04fd829e65aa70fca99b44f05ba5ed5ea56

Comment by Andrew Morrow (Inactive) [ 01/Apr/14 ]

https://github.com/mongodb/mongo-cxx-driver/pull/46

Comment by Andrew Morrow (Inactive) [ 29/Mar/14 ]

Pulling into legacy-0.8. This is too serious an issue to allow to linger (e.g. ODR violations unless consuming application defines MONGO_SSL if client library was built with --ssl).

Generated at Wed Feb 07 21:57:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.