- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
➜
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | Oren Milman |
|---|---|
| Recipients | Oren Milman |
| Date | 2017-09-25.16:47:57 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1506358077.62.0.262986415269.issue31577@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
|---|
The following code causes the interpreter to crash:
class BadInt:
def __divmod__(*args):
return 42
import os
os.utime('foo.txt', ns=(BadInt(), 1))
This is because split_py_long_to_s_and_ns() (in Modules/posixmodule.c) assumes
that PyNumber_Divmod() returns a 2-tuple, and passes it to PyTuple_GET_ITEM(),
which assumes it is a tuple. Thus, PyTuple_GET_ITEM() might return a non-NULL
value which is not an address of a Python object. |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2017-09-25 16:47:57 | Oren Milman | set | recipients: + Oren Milman |
| 2017-09-25 16:47:57 | Oren Milman | set | messageid: <1506358077.62.0.262986415269.issue31577@psf.upfronthosting.co.za> |
| 2017-09-25 16:47:57 | Oren Milman | link | issue31577 messages |
| 2017-09-25 16:47:57 | Oren Milman | create |
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements
