[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2020-02-19 Thread Tal Einat
Tal Einat added the comment: Please do, Ananthakrishnan! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2020-02-19 Thread Ananthakrishnan
Ananthakrishnan added the comment: I want to do a PR,if this is still needeed. -- nosy: +Ananthakrishnan ___ Python tracker ___ ___

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2018-07-25 Thread Tal Einat
Tal Einat added the comment: Ivan, can you supply a PR or would you like someone else to do so? -- nosy: +taleinat ___ Python tracker ___ __

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2018-03-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. > What should I write instead of _? (ValueError, OSError) > And will the next call be effective (do anything), if we have already set the > limit with the testing call? This doesn't matter. We test that it doesn't crash when parse arguments. --

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2018-03-22 Thread Ivan Zakharyaschev
Ivan Zakharyaschev added the comment: And will the next call be effective (do anything), if we have already set the limit with the testing call? -- ___ Python tracker ___ _

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2018-03-22 Thread Ivan Zakharyaschev
Ivan Zakharyaschev added the comment: Thanks! I also thought about this simplest way. What about this: diff --git a/Python/Lib/test/test_resource.py b/Python/Lib/test/test_resource.py index de29d3b..bec4440 100644 --- a/Python/Lib/test/test_resource.py +++ b/Python/Lib/test/test_resource.py @@

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2018-03-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The simplest way is to try passing the limit as a tuple resource.setrlimit(resource.RLIMIT_CPU, (100, 100)) and skip the test if it failed. -- ___ Python tracker _

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2018-03-22 Thread Ivan Zakharyaschev
Ivan Zakharyaschev added the comment: >>> import resource >>> resource.getrlimit(resource.RLIMIT_CPU) (7200, 7260) -- ___ Python tracker ___ ___

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2018-03-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What does resource.getrlimit(resource.RLIMIT_CPU) return? -- ___ Python tracker ___ ___ Python-bu

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2018-03-22 Thread Ivan Zakharyaschev
Ivan Zakharyaschev added the comment: > New changeset a4c85f9b8f58 by Serhiy Storchaka in branch '2.7': Issue #6083: Fix multiple segmentation faults occured when PyArg_ParseTuple http://hg.python.org/cpython/rev/a4c85f9b8f58 This test has a problem: though it tests not the ability to set a CPU

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2016-12-10 Thread Martin Panter
Changes by Martin Panter : -- dependencies: +resource.prlimit(int, int, str) crashs ___ Python tracker ___ ___ Python-bugs-list mailing

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2014-01-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- priority: normal -> high ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2013-10-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Accepting an arbitrary sequence when "(...)" is used in the format string was introduced in changeset 0ef1071cb7fe. -- versions: -Python 3.2 ___ Python tracker _

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2013-02-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I shouldn't close this until this dangerous feature will be deprecated. -- assignee: serhiy.storchaka -> resolution: fixed -> stage: committed/rejected -> needs patch status: closed -> open ___ Python tracker

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2013-02-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: FreeBSD 6.4 and Windows test failures was fixed in changesets 8fb98fb758e8 and ec70abe8c886. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2013-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are 6 different ways to get a function (see comment around PyCFuncPtr_new() in Modules/_ctypes/_ctypes.c). The other tests just use other ways. I'm more carefully read ctype code and found my mistake. Need to import "my_strchr", and not "strchr". ---

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2013-02-07 Thread Stefan Krah
Stefan Krah added the comment: The FreeBSD 6.4 bot is failing, too. Note that the other functions in test_returnfuncptrs.py do this in order to get strchr(): dll = CDLL(_ctypes_test.__file__) get_strchr = dll.get_strchr get_strchr.restype = CFUNCTYPE(c_char_p, c_char_p, c_char) s

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2013-02-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: serhiy.storchaka -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2013-02-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not have possibility and desires blind-repair a test on alien platform, so just temporarily disable a new test in Lib/ctypes/test/test_returnfuncptrs.py on Windows. If someone has a desire to fix it fell free to do this. I do not close this issue becaus

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2013-02-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset a4c85f9b8f58 by Serhiy Storchaka in branch '2.7': Issue #6083: Fix multiple segmentation faults occured when PyArg_ParseTuple http://hg.python.org/cpython/rev/a4c85f9b8f58 New changeset 4bac47eb444c by Serhiy Storchaka in branch '3.2': Issue #6083:

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2013-02-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: Serhiy's patch looks good to me. -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-l

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2012-12-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2012-10-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 3.3, Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2012-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which get rid of all three PyArg_ParseTuple usage with parsing nested sequences. Thanks Evgeny for reproducers. -- nosy: +serhiy.storchaka Added file: http://bugs.python.org/file27567/PyArg_ParseTuple_refcount.patch __

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2011-01-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch passes the regrtest and makes test-functools.py raise an exception rather than crash. The proposed change will make functions like partial.__setstate__ require tuple argument even though currently it would accept any container. This is

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2011-01-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Let me summarize the issue: the PyArg_ParseTuple format code 'O' returns a borrowed reference. However, when the 'O' code appears inside parenthesis, there may not be an object to hold the reference to borrow from. This is what happens in the test-fun

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2010-11-16 Thread Eugene Kapun
Changes by Eugene Kapun : Added file: http://bugs.python.org/file19618/test-functools.py ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2010-11-16 Thread Eugene Kapun
Changes by Eugene Kapun : Added file: http://bugs.python.org/file19617/test-ctypes.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2010-11-16 Thread Eugene Kapun
Eugene Kapun added the comment: Actually, this can't be fixed without modifying C API methods PyArg_ParseTuple and PyArg_ParseTupleAndKeywords, because it's possible to make an object deallocated before PyArg_ParseTuple returns, so Py_INCREF immediately after parsing would be already too late