Message291573
| Author |
serhiy.storchaka |
| Recipients |
serhiy.storchaka |
| Date |
2017年04月12日.20:58:52 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1492030732.95.0.492946948296.issue30061@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
PyObject_Size(), PySequence_Size() and PyMapping_Size() can raise an exception. But not always this is checked after using them. This can lead to a crash. For example:
>>> import io
>>> class R(io.IOBase):
... def readline(self): return None
...
>>> next(R())
Fatal Python error: a function returned a result with an error set
TypeError: object of type 'NoneType' has no len()
The above exception was the direct cause of the following exception:
SystemError: <built-in function next> returned a result with an error set
Current thread 0xb749c700 (most recent call first):
File "<stdin>", line 1 in <module> |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2017年04月12日 20:58:52 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka |
| 2017年04月12日 20:58:52 | serhiy.storchaka | set | messageid: <1492030732.95.0.492946948296.issue30061@psf.upfronthosting.co.za> |
| 2017年04月12日 20:58:52 | serhiy.storchaka | link | issue30061 messages |
| 2017年04月12日 20:58:52 | serhiy.storchaka | create |
|