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

Add a C++ demangler utility class

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
      None
    • Service Arch

      The __cxa_demangle function is hard to use efficiently.

      It accepts in/out parameters which would allow reuse of a malloc'ed buffer between calls. The malloc/free of the buffer requires some special care so we never do this, and just punt, passing nullptr arguments. We are also ignoring the status output parameter.

      On Windows we would need to "UnDecorate", I think.
      https://docs.microsoft.com/en-us/windows/win32/api/dbghelp/nf-dbghelp-undecoratesymbolname

      We should probably have a separate little C++ abstraction for it to encapsulate its complexity.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: