emacs-helm/helm

Endless loop in 'helm-fuzzy-default-highlight-match-1'

karbiv opened this issue · 4 comments

What happened?

When typing in helm minibuffer a pattern like this: "**", Helm enters endless loop and consumes 100% CPU.

It could happen on any other broken regex pattern. The problem is in re-search-forward that with some regexes doesn't move point forward and if put inside a while loop will repeat forever.
And that's normal behavior for re-search-forward because the function is supposed to work with a regex argument created and tested by a programmer, not from a user input.

There's a PR with a fix.

How to reproduce?

Input "**" in helm-mini when recentf source is enabled.

Helm Version

Master branch

Emacs Version

Emacs-29.1

OS

GNU/Linux

Relevant backtrace (if possible)

No response

Minimal configuration

  • I agree using a minimal configuration

It was a reason of other bugs, and I guess that's probably why helm-update-blacklist-regexps was created.
#2653

Fixed second re-search-forward in helm-fuzzy-default-highlight-match-1.
It entered endless loop on input "^ ". (caret and space, with recentf source)

helm-update-blacklist-regexps doesn't affect highlighting matches.

I'll get to it maybe, I was exploring why Helm buffer is erased by some one character patterns like "!", "^".