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.

classification
Title: macOS. ./configure --with-address-sanitizer; make test; cause test case crash.
Type: crash Stage: resolved
Components: Tests Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: JunyiXie, gregory.p.smith, miss-islington
Priority: normal Keywords: patch

Created on 2021-09-14 13:01 by JunyiXie, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 28331 merged JunyiXie, 2021-09-14 13:05
PR 28337 merged miss-islington, 2021-09-14 18:32
PR 28338 merged miss-islington, 2021-09-14 18:32
Messages (5)
msg401779 - (view) Author: junyixie (JunyiXie) * Date: 2021-09-14 13:01
test_io.py
```
=================================================================
==54932==ERROR: AddressSanitizer: requested allocation size 0x7fffffffffffffff (0x8000000000001000 after adjustments for alignment, red zones etc.) exceeds maximum supported size of 0x10000000000 (thread T0)
  #0 0x102f1fa6c in wrap_malloc+0x94 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fa6c)
  #1 0x102565fcc in _buffered_init bufferedio.c:730
  #2 0x10255bba4 in _io_BufferedReader___init__ bufferedio.c.h:435
  #3 0x10226c8c8 in wrap_init typeobject.c:6941
  #4 0x10216d3f8 in _PyObject_Call call.c:305
  #5 0x102387a6c in _PyEval_EvalFrameDefault ceval.c:4285
  #6 0x10237eaa8 in _PyEval_Vector ceval.c:5073
  #7 0x102396860 in call_function ceval.c:5888
  #8 0x102385444 in _PyEval_EvalFrameDefault ceval.c:4206
  #9 0x10237eaa8 in _PyEval_Vector ceval.c:5073
  #10 0x102396860 in call_function ceval.c:5888
  #11 0x102385444 in _PyEval_EvalFrameDefault ceval.c:4206
  #12 0x10237eaa8 in _PyEval_Vector ceval.c:5073
  #13 0x102172bec in method_vectorcall classobject.c:53
  #14 0x102396860 in call_function ceval.c:5888
  #15 0x1023885e4 in _PyEval_EvalFrameDefault ceval.c:4221
  #16 0x10237eaa8 in _PyEval_Vector ceval.c:5073
  #17 0x102396860 in call_function ceval.c:5888
  #18 0x102385444 in _PyEval_EvalFrameDefault ceval.c:4206
  #19 0x10237eaa8 in _PyEval_Vector ceval.c:5073
  #20 0x102172af4 in method_vectorcall classobject.c:83
  #21 0x10216d0a8 in PyVectorcall_Call call.c:255
  #22 0x102387a6c in _PyEval_EvalFrameDefault ceval.c:4285
  #23 0x10237eaa8 in _PyEval_Vector ceval.c:5073
  #24 0x10216c248 in _PyObject_FastCallDictTstate call.c:142
  #25 0x10216dc00 in _PyObject_Call_Prepend call.c:431
  #26 0x102268740 in slot_tp_call typeobject.c:7481
  #27 0x10216c5d4 in _PyObject_MakeTpCall call.c:215
  #28 0x102396b88 in call_function ceval.c
  #29 0x1023885e4 in _PyEval_EvalFrameDefault ceval.c:4221

==54932==HINT: if you don't care about these errors you may set allocator_may_return_null=1
SUMMARY: AddressSanitizer: allocation-size-too-big (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fa6c) in wrap_malloc+0x94
==54932==ABORTING
Fatal Python error: Aborted

Current thread 0x0000000102e93d40 (most recent call first):
 File "/Users/xiejunyi/github-cpython/Lib/unittest/case.py", line 201 in handle
 File "/Users/xiejunyi/github-cpython/Lib/unittest/case.py", line 730 in assertRaises
 File "/Users/xiejunyi/github-cpython/Lib/test/test_io.py", line 1558 in test_constructor
 File "/Users/xiejunyi/github-cpython/Lib/unittest/case.py", line 549 in _callTestMethod
 File "/Users/xiejunyi/github-cpython/Lib/unittest/case.py", line 591 in run
 File "/Users/xiejunyi/github-cpython/Lib/unittest/case.py", line 650 in __call__
 File "/Users/xiejunyi/github-cpython/Lib/unittest/suite.py", line 122 in run
 File "/Users/xiejunyi/github-cpython/Lib/unittest/suite.py", line 84 in __call__
 File "/Users/xiejunyi/github-cpython/Lib/unittest/suite.py", line 122 in run
 File "/Users/xiejunyi/github-cpython/Lib/unittest/suite.py", line 84 in __call__
 File "/Users/xiejunyi/github-cpython/Lib/unittest/suite.py", line 122 in run
 File "/Users/xiejunyi/github-cpython/Lib/unittest/suite.py", line 84 in __call__
 File "/Users/xiejunyi/github-cpython/Lib/test/support/testresult.py", line 140 in run
 File "/Users/xiejunyi/github-cpython/Lib/test/support/__init__.py", line 990 in _run_suite
 File "/Users/xiejunyi/github-cpython/Lib/test/support/__init__.py", line 1115 in run_unittest
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/runtest.py", line 261 in _test_module
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/runtest.py", line 215 in _runtest
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/runtest.py", line 245 in runtest
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/runtest_mp.py", line 83 in run_tests_worker
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/main.py", line 678 in _main
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/main.py", line 658 in main
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/main.py", line 736 in main
 File "/Users/xiejunyi/github-cpython/Lib/test/regrtest.py", line 43 in _main
 File "/Users/xiejunyi/github-cpython/Lib/test/regrtest.py", line 47 in <module>
 File "/Users/xiejunyi/github-cpython/Lib/runpy.py", line 86 in _run_code
 File "/Users/xiejunyi/github-cpython/Lib/runpy.py", line 196 in _run_module_as_main
```

test_decimal.py
```
0:05:09 load avg: 159.57 [287/427/30] test_decimal crashed (Exit code -6) -- running: test_pickle (1 min 35 sec), test_tokenize (3 min 14 sec), test_unparse (4 min 32 sec), test_peg_generator (48.6 sec), test_subprocess (1 min 50 sec), test_faulthandler (36.0 sec), test_capi (3 min 3 sec), test_pdb (2 min 27 sec)
=================================================================
==6547==ERROR: AddressSanitizer: requested allocation size 0xbafc24672035e58 (0xbafc24672036e58 after adjustments for alignment, red zones etc.) exceeds maximum supported size of 0x10000000000 (thread T0)
  #0 0x103d4ba6c in wrap_malloc+0x94 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fa6c)
  #1 0x10e1c9828 in mpd_switch_to_dyn mpalloc.c:217
  #2 0x10e1d7a50 in mpd_qshiftl mpdecimal.c:2514
  #3 0x10e2207a4 in _mpd_qsqrt mpdecimal.c:7945
  #4 0x10e21f188 in mpd_qsqrt mpdecimal.c:8037
  #5 0x10e190d58 in dec_mpd_qsqrt _decimal.c:4128
  #6 0x102f8fd88 in method_vectorcall_VARARGS_KEYWORDS descrobject.c:346
  #7 0x1031a6c44 in call_function ceval.c
  #8 0x103195cb0 in _PyEval_EvalFrameDefault ceval.c:4350
  #9 0x10318bc3c in _PyEval_Vector ceval.c:5221
  #10 0x102f7f994 in method_vectorcall classobject.c:54
  #11 0x1031a6c44 in call_function ceval.c
  #12 0x1031bb1f8 in DROGON_JIT_HELPER_CALL_FUNCTION ceval_jit_helper.h:3041
  #13 0x10f0c8164 (<unknown module>)
  #14 0x10318d644 in _PyEval_EvalFrameDefault ceval.c:1827
  #15 0x10318bc3c in _PyEval_Vector ceval.c:5221
  #16 0x1031a6c44 in call_function ceval.c
  #17 0x1031baf98 in DROGON_JIT_HELPER_CALL_METHOD ceval_jit_helper.h:3020
  #18 0x10f09e6ec (<unknown module>)
  #19 0x10318d644 in _PyEval_EvalFrameDefault ceval.c:1827
  #20 0x10318bc3c in _PyEval_Vector ceval.c:5221
  #21 0x102f7f89c in method_vectorcall classobject.c:84
  #22 0x102f79e50 in PyVectorcall_Call call.c:255
  #23 0x1031bb700 in DROGON_JIT_HELPER_CALL_FUNCTION_EX ceval_jit_helper.h:3117
  #24 0x10f02c2c4 (<unknown module>)
  #25 0x10318d644 in _PyEval_EvalFrameDefault ceval.c:1827
  #26 0x10318bc3c in _PyEval_Vector ceval.c:5221
  #27 0x102f78ff0 in _PyObject_FastCallDictTstate call.c:142
  #28 0x102f7a9a8 in _PyObject_Call_Prepend call.c:431
  #29 0x103074ce0 in slot_tp_call typeobject.c:7605

==6547==HINT: if you don't care about these errors you may set allocator_may_return_null=1
SUMMARY: AddressSanitizer: allocation-size-too-big (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fa6c) in wrap_malloc+0x94
==6547==ABORTING
Fatal Python error: Aborted
```
msg401780 - (view) Author: junyixie (JunyiXie) * Date: 2021-09-14 13:09
ignore test_decimal.py crash backtrace.
msg401787 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2021-09-14 18:32
New changeset b668cdfa09e9bdfcfddaadd23dbd455d5f667383 by junyixie in branch 'main':
bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331)
https://github.com/python/cpython/commit/b668cdfa09e9bdfcfddaadd23dbd455d5f667383
msg401789 - (view) Author: miss-islington (miss-islington) Date: 2021-09-14 18:54
New changeset 9ccdc90488302b212bd3405d10dc5c22052e9b4c by Miss Islington (bot) in branch '3.9':
bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331)
https://github.com/python/cpython/commit/9ccdc90488302b212bd3405d10dc5c22052e9b4c
msg401790 - (view) Author: miss-islington (miss-islington) Date: 2021-09-14 18:58
New changeset be200c3c6e2f82db553c0e5424e4ba70caf189c3 by Miss Islington (bot) in branch '3.10':
bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331)
https://github.com/python/cpython/commit/be200c3c6e2f82db553c0e5424e4ba70caf189c3
History
Date User Action Args
2022-04-11 14:59:50adminsetgithub: 89359
2021-09-14 19:06:25gregory.p.smithsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-09-14 18:58:23miss-islingtonsetmessages: + msg401790
2021-09-14 18:54:34miss-islingtonsetmessages: + msg401789
2021-09-14 18:34:09gregory.p.smithsetassignee: gregory.p.smith
versions: + Python 3.9, Python 3.10
2021-09-14 18:32:12miss-islingtonsetpull_requests: + pull_request26751
2021-09-14 18:32:08miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request26750
2021-09-14 18:32:01gregory.p.smithsetmessages: + msg401787
2021-09-14 13:09:48JunyiXiesetmessages: + msg401780
2021-09-14 13:05:44JunyiXiesetkeywords: + patch
stage: patch review
pull_requests: + pull_request26742
2021-09-14 13:01:45JunyiXiesettype: crash
2021-09-14 13:01:31JunyiXiecreate