From e5ce811f901193f14833f7d3cfe1c5cf79a0ee53 Mon Sep 17 00:00:00 2001 From: Mark Drayton Date: Fri, 31 Oct 2014 13:42:40 -0700 Subject: [PATCH] Increase size of demangled symbol buffer Summary: Symbols which demangle to a string longer than 1024 bytes are quite common in our code. This diff increases the size of the output buffer to accommodate them. Test Plan: run it Reviewed By: lucian@fb.com Subscribers: trunkagent, njormrod, folly-diffs@ FB internal diff: D1639801 Tasks: 5464222 Signature: t1:1639801:1414784601:2f59d5a58e434f4cf9df5b25b917c5094c8b133f --- folly/experimental/symbolizer/Symbolizer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/experimental/symbolizer/Symbolizer.cpp b/folly/experimental/symbolizer/Symbolizer.cpp index 53519332..f89c6f41 100644 --- a/folly/experimental/symbolizer/Symbolizer.cpp +++ b/folly/experimental/symbolizer/Symbolizer.cpp @@ -311,7 +311,7 @@ void SymbolizePrinter::print(uintptr_t address, const SymbolizedFrame& frame) { if (!frame.name || frame.name[0] == '\0') { doPrint(" (unknown)"); } else { - char demangledBuf[1024]; + char demangledBuf[2048]; demangle(frame.name, demangledBuf, sizeof(demangledBuf)); doPrint(" "); doPrint(demangledBuf[0] == '\0' ? frame.name : demangledBuf); @@ -383,7 +383,7 @@ void SymbolizePrinter::println(uintptr_t address, void SymbolizePrinter::printTerse(uintptr_t address, const SymbolizedFrame& frame) { if (frame.found && frame.name && frame.name[0] != '\0') { - char demangledBuf[1024] = {0}; + char demangledBuf[2048] = {0}; demangle(frame.name, demangledBuf, sizeof(demangledBuf)); doPrint(demangledBuf[0] == '\0' ? frame.name : demangledBuf); } else { -- 2.34.1