[pypy-svn] r45189 - pypy/dist/pypy/translator/c
arigo at codespeak.net
arigo at codespeak.net
Wed Jul 18 17:22:59 CEST 2007
Author: arigo
Date: Wed Jul 18 17:22:58 2007
New Revision: 45189
Modified:
pypy/dist/pypy/translator/c/sandbox.py
Log:
Oups! That's an infinite loop. 100% CPU instead of shutting down.
How do we test for that?
Modified: pypy/dist/pypy/translator/c/sandbox.py
==============================================================================
--- pypy/dist/pypy/translator/c/sandbox.py (original)
+++ pypy/dist/pypy/translator/c/sandbox.py Wed Jul 18 17:22:58 2007
@@ -52,6 +52,8 @@
count = rffi.cast(lltype.Signed, ll_read_not_sandboxed(fd, p, size1))
if count < 0:
raise IOError
+ if count == 0:
+ raise EOFError
got += count
p = lltype.direct_ptradd(lltype.direct_arrayitems(p), count)
p = rffi.cast(rffi.CCHARP, p)
More information about the Pypy-commit
mailing list