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

Add a C++ demangler utility class

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Internal Code
    • None
    • Service Arch

    Description

      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.

      Attachments

        Activity

          People

            backlog-server-servicearch Backlog - Service Architecture
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: