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 #85

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@jimhester
Member

jimhester commented May 12, 2016

Fixes #70

shabbychef and others added some commits Oct 27, 2015

force XML_PARSE_HUGE option
A quick 'fix' to live dangerously with huge parse stacks.
Steven Pav
@jimhester

This comment has been minimized.

Member

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

This comment has been minimized.

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

This comment has been minimized.

@hadley

hadley May 17, 2016

Member

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