[CDRIVER-1042] BSON_EXTRA_ALIGN segfaults in win32 Created: 08/Dec/15  Updated: 18/Jan/16  Resolved: 12/Jan/16

Status: Closed
Project: C Driver
Component/s: libbson, libmongoc
Affects Version/s: 1.3.0
Fix Version/s: 1.3.1

Type: Bug Priority: Major - P3
Reporter: Jeroen Ooms [X] Assignee: Hannes Magnusson
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to CDRIVER-596 Figure out what to do about bson_t al... Closed
is related to PHPC-213 Memory alignment issues on FreeBSD Closed

 Description   

Building mongo-c-driver with "#define BSON_EXTRA_ALIGN 1" works in win64 but on win32 it crashes when trying to connect:

mongoc/mongoc-cluster.c:954 _mongoc_cluster_auth_node_scram(): precondition failed: cluster
 
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Compiled with mingw-w64 with gcc 4.6.3.



 Comments   
Comment by Hannes Magnusson [ 12/Jan/16 ]

Marking this as "duplicate" of CDRIVER-596.

We are aware of alignment issues created by our use of alignment attributes and assumptions that don't work out everywhere.

For now, the fix is to not utilize the extra alignment.

Unfortunately, for backwards compatibility we cannot disable the extra alignment by default.

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