[CDRIVER-3772] Add checks for use without init or after cleanup Created: 06/Aug/20 Updated: 09/Feb/23 |
|
| Status: | Backlog |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Kevin Albertson | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | Improve Developer Experience |
| Description |
|
Calling mongoc_cleanup invalidates global state. We've had bug reports caused by applications calling mongoc_cleanup early (e.g. Though it may not be possible to reliably check if the global initialization state is valid, checks may still add safety. Namely, we can try to guard against: 1. Calling libmongoc functions after mongoc_cleanup In either of those cases, aborting seems safer than the current undefined behavior. |