Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS. ./configure --with-address-sanitizer; make test; cause test case crash. #89359

Closed
JunyiXie mannequin opened this issue Sep 14, 2021 · 5 comments
Closed

macOS. ./configure --with-address-sanitizer; make test; cause test case crash. #89359

JunyiXie mannequin opened this issue Sep 14, 2021 · 5 comments
Assignees
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes tests Tests in the Lib/test dir type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@JunyiXie
Copy link
Mannequin

JunyiXie mannequin commented Sep 14, 2021

BPO 45196
Nosy @gpshead, @miss-islington, @JunyiXie
PRs
  • bpo-45196 ./configure --with-address-sanitizer; make test; cause test case crash. #28331
  • [3.10] bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331) #28337
  • [3.9] bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331) #28338
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/gpshead'
    closed_at = <Date 2021-09-14.19:06:25.909>
    created_at = <Date 2021-09-14.13:01:31.621>
    labels = ['3.10', 'tests', '3.9', 'type-crash', '3.11']
    title = 'macOS. ./configure --with-address-sanitizer; make test; cause test case crash.'
    updated_at = <Date 2021-09-14.19:06:25.908>
    user = 'https://github.com/JunyiXie'

    bugs.python.org fields:

    activity = <Date 2021-09-14.19:06:25.908>
    actor = 'gregory.p.smith'
    assignee = 'gregory.p.smith'
    closed = True
    closed_date = <Date 2021-09-14.19:06:25.909>
    closer = 'gregory.p.smith'
    components = ['Tests']
    creation = <Date 2021-09-14.13:01:31.621>
    creator = 'JunyiXie'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45196
    keywords = ['patch']
    message_count = 5.0
    messages = ['401779', '401780', '401787', '401789', '401790']
    nosy_count = 3.0
    nosy_names = ['gregory.p.smith', 'miss-islington', 'JunyiXie']
    pr_nums = ['28331', '28337', '28338']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue45196'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @JunyiXie
    Copy link
    Mannequin Author

    JunyiXie mannequin commented Sep 14, 2021

    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
    

    @JunyiXie JunyiXie mannequin added 3.11 only security fixes tests Tests in the Lib/test dir type-crash A hard crash of the interpreter, possibly with a core dump labels Sep 14, 2021
    @JunyiXie
    Copy link
    Mannequin Author

    JunyiXie mannequin commented Sep 14, 2021

    ignore test_decimal.py crash backtrace.

    @gpshead
    Copy link
    Member

    gpshead commented Sep 14, 2021

    New changeset b668cdf by junyixie in branch 'main':
    bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331)
    b668cdf

    @gpshead gpshead added 3.9 only security fixes 3.10 only security fixes labels Sep 14, 2021
    @gpshead gpshead self-assigned this Sep 14, 2021
    @gpshead gpshead added 3.9 only security fixes 3.10 only security fixes labels Sep 14, 2021
    @gpshead gpshead self-assigned this Sep 14, 2021
    @miss-islington
    Copy link
    Contributor

    New changeset 9ccdc90 by Miss Islington (bot) in branch '3.9':
    bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331)
    9ccdc90

    @miss-islington
    Copy link
    Contributor

    New changeset be200c3 by Miss Islington (bot) in branch '3.10':
    bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331)
    be200c3

    @gpshead gpshead closed this as completed Sep 14, 2021
    @gpshead gpshead closed this as completed Sep 14, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 only security fixes tests Tests in the Lib/test dir type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants