Skip to content

Commit

Permalink
Increase the size for the demangled symbol buffer to 8192 bytes
Browse files Browse the repository at this point in the history
Previously the 1024 bytes was potentially too small for some complex
rust symbols leading to failures in demangling.

Bumping this to 8x should reduce the chances for this, but still
gives off a strong "640K Ought to be Enough for Anyone" vibe :)

Fixes: KDAB/hotspot#611
Change-Id: Ib08f7fce59766e4ed7fef094ea0a61d040e3fceb
  • Loading branch information
milianw committed Apr 12, 2024
1 parent f383638 commit 851ebf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/perfdwarfdiecache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ QByteArray demangle(const QByteArray &mangledName)
if (mangledName.length() < 3) {
return mangledName;
} else {
static size_t demangleBufferLength = 1024;
static size_t demangleBufferLength = 8192;
static char *demangleBuffer = reinterpret_cast<char *>(eu_compat_malloc(demangleBufferLength));
static Demangler demangler;

Expand Down

0 comments on commit 851ebf0

Please sign in to comment.