Bug 486162 - [Request] Extend Demangle support
Summary: [Request] Extend Demangle support
Status: REPORTED
Alias: None
Product: Heaptrack
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: Milian Wolff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-26 14:44 UTC by Matheus Catarino
Modified: 2024-04-26 14:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
heaptrack show dlang mangled functions (druntime internal) (277.88 KB, image/png)
2024-04-26 14:44 UTC, Matheus Catarino
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matheus Catarino 2024-04-26 14:44:18 UTC
Created attachment 168922 [details]
heaptrack show dlang mangled functions (druntime internal)

Similar references
- https://bugs.kde.org/show_bug.cgi?id=481485
- https://bugs.kde.org/show_bug.cgi?id=458175
- https://bugs.kde.org/show_bug.cgi?id=372182

Request to extend support also to other ABIs, like Rust, Swift, D and any mangled ABI.

Following the attachment of this report, I'm trying to investigate a possible case of DRuntimeGC memory leak on archlinux/glibc and cannot detect the same problem on alpine/musl.

I don't know if it helps, but I do know that kdab/hotspot and kdab/perfparser have support through 3rd party demangle-libraries to support Rust('_R') [v0 mangle] and D ('_D').
If this is a starting point to be added, great.
https://github.com/KDAB/hotspot/blob/1ac3ff2e885f381e0dfe86204eab0f9f82b84553/scripts/appimage/Dockerfile#L81-L100
Comment 1 Matheus Catarino 2024-04-26 14:50:20 UTC
Comment on attachment 168922 [details]
heaptrack show dlang mangled functions (druntime internal)

D code:
void main() {}

command: ldmd2 foo.d

For this print has used ldc2 (LLVM D Compiler), but same result on any D compiler.

By default using extern(D) - D ABI '_D'
extern(C++) - C++ ABI, demangle works
extern(C) - like betterC, no issue