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

Turn on XML_PARSE_HUGE

Closed
wants to merge 2 commits into from
Closed

Turn on XML_PARSE_HUGE #85

wants to merge 2 commits into from

Conversation

jimhester
Copy link
Member

@jimhester jimhester commented May 12, 2016

Fixes #70

shabbychef and others added 2 commits Oct 27, 2015
A quick 'fix' to live dangerously with huge parse stacks.
@jimhester
Copy link
Member Author

jimhester commented May 12, 2016

One benefit of the current default is if the XML is it can catch malformed XML and erroring rather than allocating a bunch of memory and crashing. It might be worth keeping the current behavior the default and allowing users to turn on XML_PARSE_HUGE if needed.

@hadley
Copy link
Member

hadley commented May 12, 2016

I'd have a slight preference towards making this an argument

(also needs a news bullet)

@@ -42,15 +42,15 @@ XPtrDoc doc_parse_raw(RawVector x, std::string encoding,
Rf_length(x),
base_url == "" ? NULL : base_url.c_str(),
encoding == "" ? NULL : encoding.c_str(),
HTML_PARSE_RECOVER | HTML_PARSE_NOERROR
HTML_PARSE_RECOVER | HTML_PARSE_NOERROR | XML_PARSE_HUGE
Copy link
Member

@hadley hadley May 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure XML_PARSE_HUGE is ok?

@jimhester jimhester closed this May 18, 2016
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 this pull request may close these issues.

None yet

3 participants