[SERVER-17237] 'entry' may be used uninitialized in PlanCache code Created: 10/Feb/15 Updated: 24/May/16 Resolved: 20/Feb/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | 3.0.0-rc8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mark Callaghan | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
I was upgraded from gcc 4.8.x to 4.9.1 and while building rc8 I get these error messages:
Looking at the code and LRUKeyValue::get I see that it can return an error without initializing the second argument, so I think this is an error. But my C++ reading skills are rusty. |
| Comments |
| Comment by Githook User [ 24/May/16 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: |
| Comment by Mark Callaghan [ 20/Feb/15 ] |
|
Please close it. Sorry for wasting time, still learning how to deal with g++ version upgrades. |
| Comment by Andrew Morrow (Inactive) [ 20/Feb/15 ] |
|
Hi mcallaghan@fb.com - Is there any further action that you would like to see taken regarding this ticket? Otherwise, I would like to close it if it really is a false positive. |
| Comment by Asya Kamsky [ 18/Feb/15 ] |
|
mdcallag you are correct, this appears to be a false positive - we actually use static analysis on all of MongoDB source (Coverity) and it also flags a similar pattern as it's problematic for any static analysis to track an allocation that depends on a specific value of a different returned variable. |
| Comment by Mark Callaghan [ 10/Feb/15 ] |
|
And now I wonder whether this is a bogus bug report as this code might prevent the use of 'entry' after an error if (!cacheStatus.isOK()) { return cacheStatus; } |