senny / rvm.el

use rvm to manage ruby versions within emacs
214 stars 42 forks source link

Fix `Stack overflow in regexp matcher' match error on some linux distrib... #47

Closed zw963 closed 10 years ago

zw963 commented 10 years ago

...ution. (regexp engine difference)

More information, please see following link: http://lists.gnu.org/archive/html/help-gnu-emacs/2011-02/msg00116.html

senny commented 10 years ago

@zw963 can you add a test-case to illustrate the use-case and prevent against regressions?

zw963 commented 10 years ago

Sorry, this problem should be a regexp engine problem, on my earlier linux distribution (complete install, with a huge size package installed Slackware 14.1), it worked. But, when I switch to a more lightweight linux distriution (salix), it cause emacs daemon can not be start.

So, it hard to reproduce this problem, I does't know emacs use which version regexp to run it, accroding to rvm info output, this regexp should be worked. what I do is only, When match this first : and ", will no longer hunger match, search next matched colon or quote.

zw963 commented 10 years ago

one mock example:

"GEM_PATH: "/Users/wzheng/.rvm/gems/ruby-2.1.1:/Users/wzheng/.rvm/gems/ruby-2.1.1@global""hello" will match GEM_PATH and "/Users/wzheng/.rvm/gems/ruby-2.1.1:/Users/wzheng/.rvm/gems/ruby-2.1.1@global" correctly.

But old regexp, will wrongly match: ( GEM_PATH: "/Users/wzheng/.rvm/gems/ruby-2.1.1 and "/Users/wzheng/.rvm/gems/ruby-2.1.1@global""hello"

senny commented 10 years ago

@zw963 thanks :yellow_heart: