[PATCH] Fix slowness in demangler

2019-11-12 Thread Tim Rühsen
Hi, this is a proposal to fix https://sourceware.org/bugzilla/show_bug.cgi?id=25180 In short: cxxfilt _ZZ1_DO1z1Dclaa1D1VEE1VE2zo takes several minutes with 100% CPU before it comes back with a result. With this patch the r

Re: [PATCH] Fix slowness in demangler

2019-11-12 Thread Tim Rühsen
On 11/12/19 4:15 PM, Ian Lance Taylor wrote: > On Tue, Nov 12, 2019 at 6:15 AM Tim Rühsen wrote: >> >> this is a proposal to fix >> https://sourceware.org/bugzilla/show_bug.cgi?id=25180 >&

Re: [PATCH] [libiberty] Fix write buffer overflow in cplus_demangle

2020-11-14 Thread Tim Rühsen
Hey, On 13.11.20 05:45, Jeff Law wrote: On 11/29/19 12:15 PM, Tim Rühsen wrote: * cplus-dem.c (ada_demangle): Correctly calculate the demangled size by using two passes. So I'm not sure why, but I can't get this patch to apply.  What's even more interesting is ada_demang

Re: [PATCH] Fix slowness in demangler

2019-11-19 Thread Tim Rühsen
On 16.11.19 18:14, Jeff Law wrote: > On 11/12/19 9:39 AM, Tim Rühsen wrote: >> On 11/12/19 4:15 PM, Ian Lance Taylor wrote: >>> On Tue, Nov 12, 2019 at 6:15 AM Tim Rühsen wrote: >>>> this is a proposal to fix >>>> https://sourceware.org/bugzill

Re: [PATCH] Fix slowness in demangler

2019-11-19 Thread Tim Rühsen
On 19.11.19 20:01, Jeff Law wrote: > On 11/19/19 12:00 PM, Tim Rühsen wrote: >> Thanks. Where exactly did it go ? Still can't see it in >> git://sourceware.org/git/binutils-gdb.git. Is there another repository ? > It's in the GCC repo. binutils-gdb will (at some poi

[PATCH] [libiberty] Fix read buffer overflow in split_directories

2019-11-28 Thread Tim Rühsen
An empty name param leads to read buffer overflow in function split_directories. * libiberty/make-relative-prefix.c (split_directories): Return early on empty name. --- libiberty/ChangeLog | 7 +++ libiberty/make-relative-prefix.c | 3 +++ 2 files changed, 10 insertions(+) dif

[PATCH] [libiberty] Fix write buffer overflow in cplus_demangle

2019-11-29 Thread Tim Rühsen
* cplus-dem.c (ada_demangle): Correctly calculate the demangled size by using two passes. Fixes #92453 --- libiberty/ChangeLog | 5 + libiberty/cplus-dem.c | 408 +++--- 2 files changed, 226 insertions(+), 187 deletions(-) diff --git a/libiberty/ChangeLo