Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-27451

Allow capture of stacks when using gperftools in DEBUG builds

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.2
    • Affects Version/s: None
    • Component/s: Build
    • Labels:
      None
    • Fully Compatible
    • Platforms 2017-01-23
    • 25

      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.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: