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.
Created on 2021年02月10日 09:00 by CharlesFengY, last changed 2022年04月11日 14:59 by admin. This issue is now closed.
| Messages (7) | |||
|---|---|---|---|
| msg386763 - (view) | Author: Yang Feng (CharlesFengY) | Date: 2021年02月10日 09:00 | |
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): pass 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() test_invalid_adpcm_state() +++++++++++++++++++++++++++++++++++++++ System Info: Ubuntu 16.04 Python Version: Python 3.9.1 |
|||
| msg386775 - (view) | Author: Irit Katriel (iritkatriel) * (Python committer) | Date: 2021年02月10日 11:55 | |
Reproduced on master as well. Simplified script: ------------------------------------------ import unittest def f(): raise TypeError class TestAudioop(unittest.TestCase): def test_invalid_adpcm_state(self): self.assertRaises(TypeError, f) self.test_invalid_adpcm_state() TestAudioop().test_invalid_adpcm_state() ------------------------------------------ |
|||
| msg386776 - (view) | Author: Yang Feng (CharlesFengY) | Date: 2021年02月10日 12:27 | |
Could you please tell me your secret method of getting the minimal script? I will try to provide minimal ones in our following work. |
|||
| msg386777 - (view) | Author: Mark Shannon (Mark.Shannon) * (Python committer) | Date: 2021年02月10日 13:05 | |
3.9 crashes. On master, I'm not seeing a crash, just a RecursionError. >>> import unittest >>> >>> def f(): ... raise TypeError ... >>> class TestAudioop(unittest.TestCase): ... def test_invalid_adpcm_state(self): ... self.assertRaises(TypeError, f) ... self.test_invalid_adpcm_state() ... >>> TestAudioop().test_invalid_adpcm_state() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 4, in test_invalid_adpcm_state File "<stdin>", line 4, in test_invalid_adpcm_state File "<stdin>", line 4, in test_invalid_adpcm_state [Previous line repeated 992 more times] File "<stdin>", line 3, in test_invalid_adpcm_state File "/home/mark/repos/cpython/Lib/unittest/case.py", line 730, in assertRaises context = _AssertRaisesContext(expected_exception, self) File "/home/mark/repos/cpython/Lib/unittest/case.py", line 168, in __init__ _BaseTestCaseContext.__init__(self, test_case) RecursionError: maximum recursion depth exceeded |
|||
| msg386778 - (view) | Author: Irit Katriel (iritkatriel) * (Python committer) | Date: 2021年02月10日 13:21 | |
Yang - no secret really, just trial and error. Mark - right I wasn't on master, sorry. |
|||
| msg386779 - (view) | Author: Mark Shannon (Mark.Shannon) * (Python committer) | Date: 2021年02月10日 13:25 | |
I think this was fixed by https://github.com/python/cpython/pull/23568 The root cause seems to be the same as #42500, so I'm going to backport https://github.com/python/cpython/pull/23568 to 3.9 |
|||
| msg386910 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2021年02月13日 05:11 | |
#43186, #43187 also have recursive code that fails in 3.9 and recovers in 3.10. Am closing them in favor of this. Also suspect #43188, #43189, #43190 are duplicates. Yang, recheck after Mark does the backport here. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:41 | admin | set | github: 87351 |
| 2021年11月19日 18:15:58 | lukasz.langa | set | status: open -> closed superseder: Cannot Recover From StackOverflow in 3.9 Tests resolution: out of date stage: resolved |
| 2021年02月13日 05:11:37 | terry.reedy | set | messages: + msg386910 |
| 2021年02月13日 04:53:58 | terry.reedy | link | issue43186 superseder |
| 2021年02月13日 04:50:57 | terry.reedy | set | messages: - msg386896 |
| 2021年02月13日 01:03:08 | terry.reedy | set | nosy:
+ terry.reedy messages: + msg386896 |
| 2021年02月10日 13:53:54 | Mark.Shannon | set | assignee: Mark.Shannon components: + Interpreter Core, - Library (Lib) versions: - Python 3.10 |
| 2021年02月10日 13:25:07 | Mark.Shannon | set | messages: + msg386779 |
| 2021年02月10日 13:21:42 | iritkatriel | set | messages: + msg386778 |
| 2021年02月10日 13:05:42 | Mark.Shannon | set | messages: + msg386777 |
| 2021年02月10日 12:27:30 | CharlesFengY | set | messages: + msg386776 |
| 2021年02月10日 11:56:09 | iritkatriel | set | versions: + Python 3.10 |
| 2021年02月10日 11:55:45 | iritkatriel | set | nosy:
+ Mark.Shannon, iritkatriel messages: + msg386775 |
| 2021年02月10日 09:00:08 | CharlesFengY | create | |