[pypy-issue] [issue1314] expat parser should read file by chunks

Fabimaru tracker at bugs.pypy.org
Sat Nov 3 18:14:58 CET 2012


New submission from Fabimaru <fabsk at free.fr>:

In the module xml.parsers.expat, when calling the method "ParseFile", the method
"Read" of the source is called with no parameter, so it read the whole file in
one call. It could use a lot of memory if the source is huge, or fail to process
an endless source.

PythonC (2.7 and 3.3) reads 2048 bytes at a time.

http://hg.python.org/cpython/file/c6237edff631/Modules/pyexpat.c#l854

----------
messages: 4962
nosy: Fabimaru, pypy-issue
priority: bug
release: 1.9
status: unread
title: expat parser should read file by chunks

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1314>
________________________________________


More information about the pypy-issue mailing list