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

Creating instance of XML::Comment with an element segfaults MRI but works fine on JRuby #1224

Closed
yorickpeterse opened this issue Jan 19, 2015 · 2 comments

Comments

@yorickpeterse
Copy link

Consider the following script:

require 'nokogiri'

document = Nokogiri::XML('<a></a>')
a_node   = document.at('a')

p Nokogiri::XML::Comment.new(a_node, 'foo')

On MRI this segfaults the process, on JRuby this appears to work fine:

#<Nokogiri::XML::Comment:0x9fe "foo">

I'm not sure if the usage of XML::Comment here is correct, but at least it shouldn't crash MRI.

@yorickpeterse
Copy link
Author

Crash output (also contains GDB backtraces): https://gist.github.com/YorickPeterse/7a21392aed7cdd0391b0

@flavorjones
Copy link
Member

Thanks for reporting. Will look into it.

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