[CDRIVER-2282] Test that mongoc_topology_compatible accepts null bson_error_t pointer Created: 14/Sep/17 Updated: 28/Oct/23 Resolved: 02/Oct/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | 1.9.0 |
| Fix Version/s: | 1.8.1, 1.9.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
An incompatible topology is possible beginning in 1.9.0 when we bump our min wire version to 2 (dropping support for MongoDB 2.4 and older). We have a risky convention throughout our code that bson_error_t pointers can be NULL, which sometimes bites us. There was a latent bug in mongoc_topology_compatible that tried to memcpy topology->compatibility_error to the bson_error_t out-pointer even if the latter was NULL, fixed as part of |
| Comments |
| Comment by Githook User [ 13/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: Revert " This reverts commit 7e8c82d I forgot that on the 1.8 branch, a maxWireVersion 1 server is still |
| Comment by Githook User [ 12/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 02/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 02/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by A. Jesse Jiryu Davis [ 14/Sep/17 ] |
|
Also backport to r1.8 branch in case there's a 1.8.1 release - it would deserve to have the fix and this test too. |