Commit 924307b4 authored by Pádraig Brady's avatar Pádraig Brady Committed by Facebook GitHub Bot

folly: allow demangling very large symbols

Summary:
Newer libiberty has limits that over constrain
the size of symbols that can be demangled.
This applies the same adjustment in the default
platform009 demangler, done in D26380825

Differential Revision: D26617797

fbshipit-source-id: 8d3e72a0807aa9ecff18d26f38c1acb83f9c051b
parent 72704183
...@@ -30,6 +30,10 @@ ...@@ -30,6 +30,10 @@
#undef HAVE_DECL_BASENAME #undef HAVE_DECL_BASENAME
#endif #endif
#ifndef DMGL_NO_RECURSE_LIMIT
#define DMGL_NO_RECURSE_LIMIT 0
#endif
namespace folly { namespace folly {
namespace detail { namespace detail {
...@@ -38,7 +42,8 @@ int cplus_demangle_v3_callback_wrapper( ...@@ -38,7 +42,8 @@ int cplus_demangle_v3_callback_wrapper(
void (*const cbref)(char const*, std::size_t, void*), void (*const cbref)(char const*, std::size_t, void*),
void* const opaque) { void* const opaque) {
#if FOLLY_DETAIL_HAVE_DEMANGLE_H #if FOLLY_DETAIL_HAVE_DEMANGLE_H
auto const options = DMGL_PARAMS | DMGL_ANSI | DMGL_TYPES; auto const options =
DMGL_PARAMS | DMGL_ANSI | DMGL_TYPES | DMGL_NO_RECURSE_LIMIT;
return cplus_demangle_v3_callback(mangled, options, cbref, opaque); return cplus_demangle_v3_callback(mangled, options, cbref, opaque);
#else #else
(void)mangled; (void)mangled;
...@@ -50,7 +55,8 @@ int cplus_demangle_v3_callback_wrapper( ...@@ -50,7 +55,8 @@ int cplus_demangle_v3_callback_wrapper(
char* cplus_demangle_v3_wrapper(const char* mangled) { char* cplus_demangle_v3_wrapper(const char* mangled) {
#if FOLLY_DETAIL_HAVE_DEMANGLE_H #if FOLLY_DETAIL_HAVE_DEMANGLE_H
auto const options = DMGL_PARAMS | DMGL_ANSI | DMGL_TYPES; auto const options =
DMGL_PARAMS | DMGL_ANSI | DMGL_TYPES | DMGL_NO_RECURSE_LIMIT;
return cplus_demangle_v3(mangled, options); return cplus_demangle_v3(mangled, options);
#else #else
(void)mangled; (void)mangled;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment