[issue31577] crash in os.utime() in case of a bad ns argument

2018-09-14 Thread Zachary Ware
Zachary Ware added the comment: Serhiy has opened bpo-34676 for the idea of restricting PyNumber_Divmod()'s return type, so I'm closing the issue. -- stage: commit review -> resolved status: pending -> closed ___ Python tracker

[issue31577] crash in os.utime() in case of a bad ns argument

2018-09-13 Thread Zachary Ware
Zachary Ware added the comment: The crash is fixed, so I've lowered the priority. Serhiy, are you still interested in pursuing an alternative fix in 3.8, or content with what's merged? -- priority: release blocker -> normal resolution: -> fixed stage: patch review -> commit review

[issue31577] crash in os.utime() in case of a bad ns argument

2018-09-13 Thread Ned Deily
Ned Deily added the comment: Thanks, Serihy. Can we either close this now or remove 3.7 and "release blocker"? -- ___ Python tracker ___

[issue31577] crash in os.utime() in case of a bad ns argument

2018-09-12 Thread miss-islington
miss-islington added the comment: New changeset 329ea4ef7cc3a907a64c6f0702fc93206b6744de by Miss Islington (bot) in branch '3.7': bpo-31577: Fix a crash in os.utime() in case of a bad ns argument. (GH-3752) https://github.com/python/cpython/commit/329ea4ef7cc3a907a64c6f0702fc93206b6744de

[issue31577] crash in os.utime() in case of a bad ns argument

2018-09-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +8653 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31577] crash in os.utime() in case of a bad ns argument

2018-09-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0bd1a2dcfdf36b181385ae61361e7692f4ebb0fd by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-31577: Fix a crash in os.utime() in case of a bad ns argument. (GH-3752)

[issue31577] crash in os.utime() in case of a bad ns argument

2018-09-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 3752 LGTM. I have reran CI tests, if they will be passed, the PR can be merged. This PR was not merged only because we discussed possible alternate solutions and lost an opportunity to merge it for 3.7.0. I agree that timedelta.__divmod__ doesn't have

[issue31577] crash in os.utime() in case of a bad ns argument

2018-09-12 Thread Ned Deily
Ned Deily added the comment: @Serihy, @Mark, others, any suggestions for what to do for 3.7.1? -- ___ Python tracker ___ ___

[issue31577] crash in os.utime() in case of a bad ns argument

2018-09-11 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31577] crash in os.utime() in case of a bad ns argument

2018-09-10 Thread Zachary Ware
Zachary Ware added the comment: Adding Ned and marking as release blocker as this is a crasher in 3.7.0. -- nosy: +ned.deily priority: normal -> release blocker ___ Python tracker

[issue31577] crash in os.utime() in case of a bad ns argument

2018-09-10 Thread Zachary Ware
Zachary Ware added the comment: We definitely can't make that change to PyNumber_Divmod in 3.7 at this point, I'm sure someone somewhere is relying on being able to get arbitrary information out of their objects with `divmod(crazy_object)`. I don't know enough math to say whether there

[issue31577] crash in os.utime() in case of a bad ns argument

2017-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is also similar issue in timedelta.__divmod__. PyLong_Type.tp_as_number->nb_divmod() works only with integers. The different way of solving this issue is used in microseconds_to_delta_ex() in _datetimemodule.c. Perhaps the best solution is to add a

[issue31577] crash in os.utime() in case of a bad ns argument

2017-09-25 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch pull_requests: +3739 stage: -> patch review ___ Python tracker ___

[issue31577] crash in os.utime() in case of a bad ns argument

2017-09-25 Thread Oren Milman
Oren Milman added the comment: I opened a PR. I think another fix might be to use PyLong_Type.tp_as_number->long_divmod() instead of PyNumber_Divmod(). -- ___ Python tracker

[issue31577] crash in os.utime() in case of a bad ns argument

2017-09-25 Thread Oren Milman
New submission from Oren Milman: 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()