[SERVER-18859] Logging before dynamic initializers have run in thread_name.cpp leaks memory Created: 07/Jun/15 Updated: 05/Feb/16 Resolved: 09/Jun/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Platform 5 06/26/16 | ||||
| Participants: | |||||
| Linked BF Score: | 0 | ||||
| Description |
|
If dynamic initialization for a global in a translation unit runs and invokes the logging subsystem before dynamic initialization has completed for the globals in src/mongo/util/concurrency/thread_name.cpp, then access to a zero-initialized boost::thread_specific_pointer variable will occur, resulting in undefined behavior. The observed behavior is that the program leaks a std::string, since it either isn't actually set, or is overwritten when the dynamic initializer for the thread_specific_pointer runs. |
| Comments |
| Comment by Daniel Pasette (Inactive) [ 18/Jun/15 ] |
|
removing from backport list after discussion with Drew. |
| Comment by Githook User [ 09/Jun/15 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: |