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

Myhtml hangs in threaded mode (infinite loop?) when opening this file #117

Closed
Overbryd opened this issue Aug 31, 2017 · 1 comment
Closed

Comments

@Overbryd
Copy link
Contributor

Hi,

using myhtml from branch "master" at sha "94d983a78cf59f56f9226f74efa0bffe7dcfad34".

With the following example code, parsing this file does not return.

Code and example file can be found in this gist.

Reproduce:

# fetch myhtml from master at 94d983a78cf59f56f9226f74efa0bffe7dcfad34
$ git clone https://github.com/lexborisov/myhtml.git
$ cd myhtml
$ git reset --hard 94d983a78cf59f56f9226f74efa0bffe7dcfad34

# Download example html from gist
$ curl -LO https://gist.github.com/Overbryd/8115525c6bacc766c86ce92947351cff/raw/215a65a45aab6d26a943d837310ef2931d0d3611/github_trending_js.html

# Download example c from gist
$ curl -Lo examples/myhtml/myhtml_init_parse_threaded.c https://gist.github.com/Overbryd/8115525c6bacc766c86ce92947351cff/raw/6c467a502974f01a5353e33529919758ef8ba596/myhtml_init_parse_threaded.c

# Make all
$ make all

# Execute threaded parse on example file
$ ./bin/myhtml/myhtml_init_parse_threaded github_trending_js.html
# ...will never return

Observations

It parses fine in single mode, it only fails in threaded mode (the example is using 4 threads).

$ uname -a
Darwin lukas.home 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
@Overbryd Overbryd changed the title Myhtml hangs (infinite loop?) when opening this file Myhtml hangs in threaded mode (infinite loop?) when opening this file Aug 31, 2017
@lexborisov
Copy link
Owner

Hi!
You found a real mistake, the changes for Modest are to blame, it is necessary to write tests.

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

No branches or pull requests

2 participants