Skip to content

overflow_check_* failures in tests #3588

Description

@gsnedders

Running the tests with CC=-ftrapv shows that #1911 isn't the only overflow-related error and we're thus hitting undefined behaviour in other cases; notably in Overflow.c we often do operations on signed integers regardless of whether or not we're in the overflow case. PR forthcoming.

cython$ CFLAGS=-ftrapv python runtests.py overflow
Python 3.8.2 (default, Apr  8 2020, 14:31:25) 
[GCC 9.3.0]

Running tests against Cython 3.0a4 3bba77a2bf9ed7da4c118fd7887658c597e14cd2
Using Cython language level 2.
Backends: c,cpp

Fatal Python error: Aborted

Thread 0x00007fb5bcdce700 (most recent call first):
  File "runtests.py", line 2267 in time_stamper
  File "/usr/lib/python3.8/threading.py", line 870 in run
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap

Current thread 0x00007fb5bdda3740 (most recent call first):
  File "<doctest overflow_check_int.test_add_const[1]>", line 1 in <module>
  File "/usr/lib/python3.8/doctest.py", line 1329 in __run
  File "/usr/lib/python3.8/doctest.py", line 1476 in run
  File "/usr/lib/python3.8/doctest.py", line 2191 in runTest
  File "/usr/lib/python3.8/unittest/case.py", line 633 in _callTestMethod
  File "/usr/lib/python3.8/unittest/case.py", line 676 in run
  File "/usr/lib/python3.8/unittest/case.py", line 736 in __call__
  File "/usr/lib/python3.8/unittest/suite.py", line 122 in run
  File "runtests.py", line 1315 in run_test
  File "runtests.py", line 1321 in run_forked_test
  File "runtests.py", line 1316 in run_doctests
  File "runtests.py", line 1304 in run_tests
  File "runtests.py", line 1286 in run
  File "/usr/lib/python3.8/unittest/case.py", line 736 in __call__
  File "/usr/lib/python3.8/unittest/suite.py", line 122 in run
  File "/usr/lib/python3.8/unittest/suite.py", line 84 in __call__
  File "/usr/lib/python3.8/unittest/suite.py", line 122 in run
  File "/usr/lib/python3.8/unittest/suite.py", line 84 in __call__
  File "/usr/lib/python3.8/unittest/suite.py", line 122 in run
  File "/usr/lib/python3.8/unittest/suite.py", line 84 in __call__
  File "/usr/lib/python3.8/unittest/runner.py", line 176 in run
  File "runtests.py", line 2573 in runtests
  File "runtests.py", line 2209 in main
  File "runtests.py", line 2595 in <module>
Aborted (core dumped)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions