[New-bugs-announce] [issue43660] Segmentation fault when overriding sys.stderr

Pablo Galindo Salgado report at bugs.python.org
Mon Mar 29 14:42:46 EDT 2021


New submission from Pablo Galindo Salgado <pablogsal at gmail.com>:

This code crashes (reported by the one and only Matt Wozniski):

import sys
class MyStderr:
    def write(self, s):
        sys.stderr = None
sys.stderr = MyStderr()
1/0

[1]    34112 segmentation fault  ./python.exe lel.py

----------
components: Interpreter Core
messages: 389722
nosy: pablogsal, vstinner
priority: normal
severity: normal
status: open
title: Segmentation fault when overriding sys.stderr
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43660>
_______________________________________


More information about the New-bugs-announce mailing list