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

JSON_PARSER.parse_string can exhaust memory #160

Open
colin-adams opened this issue Jan 29, 2015 · 2 comments
Open

JSON_PARSER.parse_string can exhaust memory #160

colin-adams opened this issue Jan 29, 2015 · 2 comments

Comments

@colin-adams
Copy link
Member

If an incomplete JSON document is being parsed (e.g. if you have only fetched 8K out of a 380K HTTP response), then parse_string will keep appending NULLs to the end of the string until memory is exhausted. This is because it keeps calling next without then testing if we have passed the end of the data, and actual returns %U.

It should check if we have passed the end of the data and set has_more to True (and is_parsed to False).

@jocelyn
Copy link
Member

jocelyn commented Jan 29, 2015

Hi Colin,
Do you have a working patch that fixes this issue?

@colin-adams
Copy link
Member Author

No.
I bypassed it by correcting my HTTP fetch code, so i had a good document.
:-)

On 29 January 2015 at 09:54, Jocelyn Fiat [email protected] wrote:

Hi Colin,
Do you have a working patch that fixes this issue?


Reply to this email directly or view it on GitHub
#160 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants