Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regexp stack overflow #36

Merged
merged 1 commit into from
Jun 14, 2017
Merged

Conversation

stsquad
Copy link
Contributor

@stsquad stsquad commented May 30, 2017

When I run this in some project dirs I get the following error:

long string-length:4573
long string-length:176
long string-length:152007
error in process filter: if: Stack overflow in regexp matcher
error in process filter: Stack overflow in regexp matcher
long string-length:117095
error in process filter: if: Stack overflow in regexp matcher
error in process filter: Stack overflow in regexp matcher
long string-length:177532
error in process filter: if: Stack overflow in regexp matcher
error in process filter: Stack overflow in regexp matcher

This is usually because a match has hit a xml file with no newlines.
As a simple hack I truncate the string to (window-width) to avoid this
problem.

When I run this in some project dirs I get the following error:

  long string-length:4573
  long string-length:176
  long string-length:152007
  error in process filter: if: Stack overflow in regexp matcher
  error in process filter: Stack overflow in regexp matcher
  long string-length:117095
  error in process filter: if: Stack overflow in regexp matcher
  error in process filter: Stack overflow in regexp matcher
  long string-length:177532
  error in process filter: if: Stack overflow in regexp matcher
  error in process filter: Stack overflow in regexp matcher

This is usually because a match has hit a xml file with no newlines.
As a simple hack I truncate the string to (window-width) to avoid this
problem.
@coveralls
Copy link

coveralls commented May 30, 2017

Coverage Status

Coverage decreased (-0.4%) to 45.283% when pulling fd35b90 on stsquad:fix-regexp-overflow into e3ae5f6 on yasuyk:master.

@stsquad
Copy link
Contributor Author

stsquad commented May 30, 2017

@yasuyk is there an easy way to plumb a test for helm-git-grep-filtered-candidate-transformer-file-line-1 into the tests? I'm sorry I'm not very familiar with ert.

@stsquad
Copy link
Contributor Author

stsquad commented Jun 13, 2017

@yasuyk ping?

@yasuyk yasuyk merged commit fd35b90 into yasuyk:master Jun 14, 2017
@yasuyk
Copy link
Owner

yasuyk commented Jun 14, 2017

@stsquad Thank you for PR! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants