[Issue 23903] Demangling produces exponentially long output

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 8 18:13:41 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23903

--- Comment #1 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
This also applies to C++, where it seems to be a known problem.

Google's Abseil limits demangling recursion with a "ComplexityGuard":
https://chromium.googlesource.com/external/github.com/abseil/abseil-cpp/+/HEAD/absl/debugging/internal/demangle.cc#187

Some discussion in a blog post about implementing a C++ demangler in Rust:
https://fitzgeraldnick.com/2017/02/22/cpp-demangle.html#what-makes-demangling-c-symbols-difficult

--


More information about the Digitalmars-d-bugs mailing list