[lldb-dev] [Bug 36155] New: FastDemangle performance problem
via lldb-dev
lldb-dev at lists.llvm.org
Tue Jan 30 10:29:26 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=36155
Bug ID: 36155
Summary: FastDemangle performance problem
Product: lldb
Version: 6.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: lldb-dev at lists.llvm.org
Reporter: feishenniubi at gmail.com
CC: llvm-bugs at lists.llvm.org
Here's a simple python program that generates a mangled string with size n:
def gen(n):
prefix = '_Z0'
suffix = 'Mm0'
content = 'M0' * (n-6)
return prefix + content + suffix
lldb's FastDemangler exhibit quadratic behavior when demangling such a string.
On my laptop (2015 Thinkpad t440p Arch Linux), setting n to ~20000 will cause a
noticable slowdown, and ~50000 would just segfault the program.
The same inputs are rejected instantly by itaniumDemangle() as well as c++filt.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20180130/243ca2f6/attachment.html>
More information about the lldb-dev
mailing list