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.

classification
Title: Fixes bugs found by pyfailmalloc during Python initialization
Type: Stage:
Components: Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: jcea, python-dev, skrah, vstinner
Priority: normal Keywords:

Created on 2013-07-21 11:22 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1995 merged matrixise, 2017-06-08 10:16
Messages (9)
msg193439 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-07-21 11:22
I'm working on a version of pyfailmalloc integrated into CPython to inject memory allocation failures duging Python startup. As expected, I found new bugs.

I create this issue to track these bugs and their fix, as I did with the issue #18408.

Home page of the project:
https://pypi.python.org/pypi/pyfailmalloc
msg193440 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-07-21 11:26
New changeset 276477d5a548 by Victor Stinner in branch 'default':
Issue #18520: Fix initsigs(), handle PyOS_InitInterrupts() error
http://hg.python.org/cpython/rev/276477d5a548
msg193441 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-07-21 11:26
PyStructSequence_InitTypeWithError() return type is void, whereas it can fail and raise an exception. Can I change the return type, or should I create a new function?
msg193567 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-07-22 21:59
New changeset fc718c177ee6 by Victor Stinner in branch 'default':
Issue #18520: Add a new PyStructSequence_InitType2() function, same than
http://hg.python.org/cpython/rev/fc718c177ee6

New changeset 9b77b3ee6fb8 by Victor Stinner in branch 'default':
Issue #18520: PyErr_NoMemory() now fails with a fatal error if it is called
http://hg.python.org/cpython/rev/9b77b3ee6fb8

New changeset 31796b188bec by Victor Stinner in branch 'default':
Issue #18520: Fix _PySys_Init(), handle PyDict_SetItemString() errors
http://hg.python.org/cpython/rev/31796b188bec

New changeset d38348173c46 by Victor Stinner in branch 'default':
Issue #18520: initsite() is a little bit more verbose when import site fails
http://hg.python.org/cpython/rev/d38348173c46

New changeset 9267a0b836b7 by Victor Stinner in branch 'default':
Issue #18520: Fix PyFunction_NewWithQualName() error handling
http://hg.python.org/cpython/rev/9267a0b836b7

New changeset 4a69dbe71aeb by Victor Stinner in branch 'default':
Issue #18520: Fix _PyDict_GetItemId(), suppress _PyUnicode_FromId() error
http://hg.python.org/cpython/rev/4a69dbe71aeb

New changeset a4998e8fd7fc by Victor Stinner in branch 'default':
Issue #18520: Fix initstdio(), handle PySys_SetObject() failure
http://hg.python.org/cpython/rev/a4998e8fd7fc
msg193572 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-07-22 22:47
I ran my test for more than 30 minutes and I didn't find any interesting bug anymore, so I'm closing the issue.
msg201467 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2013-10-27 15:53
Victor, could you look at the end of #10241?  Starting from 31796b188bec,
many values in _PySys_Init() have 2 references. Why is that required?
msg201471 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-27 16:16
New changeset 5eb00460e6e8 by Victor Stinner in branch 'default':
Issue #18520: fix reference leak in _PySys_Init()
http://hg.python.org/cpython/rev/5eb00460e6e8
msg201472 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-10-27 16:17
> Victor, could you look at the end of #10241?  Starting from 31796b188bec,
> many values in _PySys_Init() have 2 references. Why is that required?

It was a mistake, it should now be fixed. Nice catch.
msg201475 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2013-10-27 16:35
Ah, thanks. I was wondering if there was some obscure reason that escaped me.
History
Date User Action Args
2022-04-11 14:57:48adminsetgithub: 62720
2017-06-08 10:16:46matrixisesetpull_requests: + pull_request2060
2013-10-27 16:35:20skrahsetmessages: + msg201475
2013-10-27 16:17:03vstinnersetmessages: + msg201472
2013-10-27 16:16:14python-devsetmessages: + msg201471
2013-10-27 15:53:49skrahsetnosy: + skrah
messages: + msg201467
2013-07-23 14:49:30jceasetnosy: + jcea
2013-07-22 22:47:29vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg193572
2013-07-22 21:59:05python-devsetmessages: + msg193567
2013-07-21 11:26:44vstinnersetmessages: + msg193441
2013-07-21 11:26:05python-devsetnosy: + python-dev
messages: + msg193440
2013-07-21 11:22:44vstinnercreate