https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102732
Bug ID: 102732 Summary: quadratic/exponential time complexity on D demangler Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: demangler Assignee: unassigned at gcc dot gnu.org Reporter: contact at lsferreira dot net Target Milestone: --- Feeding the initial mangled symbol "_D3eeeRRRRS2RPRRS2RPRgRgRRRRRS4RPRgRggRgRRRRRS2RPRgPRRS6RPRgRgRRRS2RPRgPRRS2" and subsequentially append "_D3eeeRRRRRRRRRS2RPRgPRRS6RPRgRgRRRS2RPRgPRRS2" to it, makes the demangler demangle it in an excessive time. This was found with libfuzzer, and other meaningful results can be found here: https://lsferreira.net/public/assets/posts/d-saoc-2021-02/fuzzer-results/ This seems to be either quadratic or exponential in terms of time complexity. Similar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80002 , this needs to be fixed until we add libiberty to Google OSS fuzz.