[New-bugs-announce] [issue38127] A fatal error when running test_ctypes

Zackery Spytz report at bugs.python.org
Wed Sep 11 23:37:56 EDT 2019


New submission from Zackery Spytz <zspytz at gmail.com>:

When running test_ctypes, I encountered a fatal error.

./python -m test test_ctypes
Run tests sequentially
0:00:00 load avg: 0.13 [1/1] test_ctypes
Fatal Python error: a function returned a result with an error set
MemoryError

The above exception was the direct cause of the following exception:

SystemError: <built-in method from_param of _ctypes.PyCPointerType object at 0x55ff17de6e60> returned a result with an error set

Current thread 0x00007f80d7417140 (most recent call first):
  File "/home/lubuntu2/cpython/Lib/ctypes/test/test_as_parameter.py", line 41 in test_pointers
  File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 616 in _callTestMethod
  File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 659 in run
  File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 719 in __call__
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/home/lubuntu2/cpython/Lib/test/support/testresult.py", line 162 in run
  File "/home/lubuntu2/cpython/Lib/test/support/__init__.py", line 1996 in _run_suite
  File "/home/lubuntu2/cpython/Lib/test/support/__init__.py", line 2092 in run_unittest
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 209 in _test_module
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 234 in _runtest_inner2
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 153 in _runtest
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 193 in runtest
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 409 in run_tests_sequential
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 507 in run_tests
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 674 in _main
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 628 in main
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 695 in main
  File "/home/lubuntu2/cpython/Lib/test/__main__.py", line 2 in <module>
  File "/home/lubuntu2/cpython/Lib/runpy.py", line 85 in _run_code
  File "/home/lubuntu2/cpython/Lib/runpy.py", line 192 in _run_module_as_main
Aborted (core dumped)



It seems that this is because the PyObject_IsSubclass() call in PyCPointerType_from_param() is not checked for failure.

----------
components: Extension Modules, ctypes
messages: 352045
nosy: ZackerySpytz
priority: normal
severity: normal
status: open
title: A fatal error when running test_ctypes
type: crash
versions: Python 3.7, Python 3.8, Python 3.9

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


More information about the New-bugs-announce mailing list