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: tuple.__repr__ may segv when it contains NULL
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: methane, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2017-02-03 12:16 by methane, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tuple-repr-NULL.patch methane, 2017-02-03 12:16 review
Messages (3)
msg286861 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2017-02-03 12:16
sys.getobjects() contains tuples including NULLs.
Even without pydebug, tuple under construction can be exposed accidentally.

Allowing repr() for such tuples ease investigating what is the tuple.
msg286862 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2017-02-03 12:23
The patch missed `continue;`.
And I couldn't reproduce the problem for now.

I'll reopen when I can reproduce the problem.
msg286881 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-02-03 18:00
This looks similar to issue26811.

I think that if the reproducer is found it would be better to fix the case of leaking a tuple containing NULL rather than making repr() be aware of NULLs. repr() is not the only way to crash with such tuples.
History
Date User Action Args
2022-04-11 14:58:42adminsetgithub: 73620
2017-02-03 18:00:33serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg286881
2017-02-03 12:23:57methanesetstatus: open -> closed
resolution: rejected
messages: + msg286862

stage: resolved
2017-02-03 12:16:12methanecreate