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

Processes stuck in rinku with 2.0.5 #84

Closed
tomhughes opened this issue Feb 14, 2019 · 3 comments · Fixed by #85
Closed

Processes stuck in rinku with 2.0.5 #84

tomhughes opened this issue Feb 14, 2019 · 3 comments · Fixed by #85

Comments

@tomhughes
Copy link

tomhughes commented Feb 14, 2019

Upgrading from 2.0.4 to 2.0.5 seems to have caused processes to start getting stuck in an infinite loop processing particular inputs. I captured a stack trace of one that seemed to be stuck:

#0  0x00007f51901e2fb4 in utf8proc_next (pos=<synthetic pointer>, str=0x7f5174cbffa0 "https://www.keepright.atの情報をもとにエラー修正") at utf8.c:73
#1  utf8proc_find_space (str=str@entry=0x7f5174cbffa0 "https://www.keepright.atの情報をもとにエラー修正", pos=59, size=size@entry=60) at utf8.c:106
#2  0x00007f51901e19b4 in autolink__url (link=0x7f51964a6770, data=0x7f5174cbffa0 "https://www.keepright.atの情報をもとにエラー修正", pos=5, size=60, flags=<optimised out>)
    at autolink.c:307
#3  0x00007f51901e2199 in rinku_autolink (ob=ob@entry=0x7f516c763070, text=<optimised out>, size=60, mode=mode@entry=AUTOLINK_URLS, flags=flags@entry=0, 
    link_attr=0x7f518b1c2d89 "rel=\"nofollow\"", link_attr@entry=0x7f518b1c2d88 " rel=\"nofollow\"", skip_tags=0x7f51903e5020 <SKIP_TAGS.9475>, link_text_cb=0x0, payload=0x7f51964a6930)
    at rinku.c:218
#4  0x00007f51901e28eb in rb_rinku_autolink (argc=<optimised out>, argv=<optimised out>, self=<optimised out>) at rinku_rb.c:208
@tomhughes
Copy link
Author

Maybe because the change to check_domain means that https://github.com/vmg/rinku/blob/master/ext/rinku/autolink.c#L187 can return false without updating link->end so that nothing is consumed?

@kivikakk
Copy link
Contributor

Thanks for the report, I'll fix this up!

@kivikakk
Copy link
Contributor

2.0.6 has been released, which addresses this. Thanks!

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 a pull request may close this issue.

2 participants