[SERVER-45388] Add a C++ demangler utility class Created: 07/Jan/20 Updated: 06/Dec/22 Resolved: 13/Aug/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Billy Donahue | Assignee: | Backlog - Service Architecture |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Service Arch
|
| Participants: |
| 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. We should probably have a separate little C++ abstraction for it to encapsulate its complexity. |