-
Type: Bug
-
Resolution: Done
-
Priority: Critical - P2
-
Affects Version/s: None
-
Component/s: Internal Client
-
None
-
Environment:5d3433eb31a58a4fcd242f8a0437819f63df723e
-
Fully Compatible
-
ALL
when including the C++ driver, some important system calls and macros like 'assert' and 'malloc' get redefined ant not defined back into the original state. Makes using the C++ driver unusable as part of a larger application.
Will patches to fix this behaviour be accepted?
- 1 "/home/piotr/devel/mmcc_mongodb/3rd-party/mongodb/src/mongo/client/../util/allocator.h" 1
- 18 "/home/piotr/devel/mmcc_mongodb/3rd-party/mongodb/src/mongo/client/../util/allocator.h"
namespace mongo {
inline void * ourmalloc(size_t size)
{ void *x = malloc(size); if ( x == 0 ) dbexit( EXIT_OOM_MALLOC , "malloc fails"); return x; }inline void * ourrealloc(void *ptr, size_t size)
{ void *x = realloc(ptr, size); if ( x == 0 ) dbexit( EXIT_OOM_REALLOC , "realloc fails"); return x; }#define MONGO_malloc mongo::ourmalloc
#define malloc MONGO_malloc
- is related to
-
SERVER-1042 mongo c++ headers have a #define for malloc, this breaks code compilation with certain boost headers
- Closed
- related to
-
SERVER-14889 report out of memory error when malloc() or realloc() fails
- Closed