[New-bugs-announce] [issue43185] <unittest> AssertRaises() causes core dump in handling recursion

Yang Feng report at bugs.python.org
Wed Feb 10 04:00:08 EST 2021

New submission from Yang Feng <charles.fy at foxmail.com>:

Seeing the following program, in the second assertRaises(), function "test_invalid_adpcm_state()"  is recursively called. Then a fatal Python error shows up and the Python interpreter crashes. 

import unittest
import audioop

class TestAudioop(unittest.TestCase):

def test_invalid_adpcm_state():
         TestAudioop.assertRaises(TypeError, audioop.lin2adpcm, b'\x00', 1, 555)
         TestAudioop.assertRaises(test_invalid_adpcm_state(), audioop.adpcm2lin, b'\x00', 1, (0, (- 1)))

TestAudioop = TestAudioop()


System Info: Ubuntu 16.04
Python Version:  Python 3.9.1

components: Library (Lib)
messages: 386763
nosy: CharlesFengY
priority: normal
severity: normal
status: open
title: <unittest> AssertRaises() causes core dump in handling recursion
type: crash
versions: Python 3.9

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list