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

after update to 2.0.0, sigfault with collections #84

Closed
kostya opened this issue Jan 7, 2017 · 1 comment
Closed

after update to 2.0.0, sigfault with collections #84

kostya opened this issue Jan 7, 2017 · 1 comment

Comments

@kostya
Copy link
Contributor

kostya commented Jan 7, 2017

i update my wrapper to version 2.0.0 (https://github.com/kostya/myhtml/compare/update)
i replaced functions tag_index_* to myhtml_get_nodes_by_tag_id, and now get sigfault when collection receive more than 1024 elements.

short example:

str = "<html>" + "<div class=A>ooo</div>" * 2000 + "</html>"
parser = Myhtml::Parser.new(str)

c = 0
parser.nodes(:div).each do |node|
  c += 1
  p(node.attribute_by("class"), c)
end
....
1020
"A"
1021
"A"
1022
"A"
1023
Invalid memory access (signal 11) at address 0x40
[4482610235] *CallStack::print_backtrace:Int32 +107
[4482583783] __crystal_sigfault_handler +55
[140735761716522] _sigtramp +26
[4482834581] myhtml_node_attribute_first +5
[4482795982] *Myhtml::Node#attribute_by<String>:(String | Nil) +62
[4482548179] __crystal_main +1587
[4482583528] main +40
lexborisov added a commit that referenced this issue Jan 7, 2017
@lexborisov
Copy link
Owner

HI!
You found a really serious problem. Fixed!
Thank you!

lexborisov added a commit to lexborisov/Modest that referenced this issue Jan 8, 2017
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