[SERVER-27451] Allow capture of stacks when using gperftools in DEBUG builds Created: 18/Dec/16  Updated: 05/Apr/17  Resolved: 21/Dec/16

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 3.5.2

Type: Improvement 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:
Related
Backwards Compatibility: Fully Compatible
Sprint: Platforms 2017-01-23
Participants:
Linked BF Score: 25

 Description   

We currently always build gperftools with the TCMALLOC_NO_SAMPLES define set, which means that we don't capture the stack info on allocations or de-allocations. This means that when we detect memory corruption, in particular from a use after free, TCMalloc can't tell us where the memory was freed, just that it was used after the free. This has made some intermittent memory corruption issues more difficult to find than anticipated. One possible risk in doing so is that this could alter the timings enough to make some racey UAF bugs disappear, subverting the purpose of the debug allocator.



 Comments   
Comment by Githook User [ 21/Dec/16 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-27451 Allow tcmalloc stack sample capture in debug builds
Branch: master
https://github.com/mongodb/mongo/commit/79631667e6a9371c0a664898256c863afa0f7dd7

Generated at Thu Feb 08 04:15:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.