FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

3.14: ASan SEGV in _TAIL_CALL_JUMP_BACKWARD_JIT during editable build · Issue #158961 · python/cpython · GitHub

Repository navigation

3.14: ASan SEGV in _TAIL_CALL_JUMP_BACKWARD_JIT during editable build #158961

Description

Bug report

I configured CPython with:

CC=clang CXX=clang++ LDFLAGS='-fuse-ld=lld' ./configure --with-tail-call-interp --enable-experimental-jit=yes --with-pydebug --with-address-sanitizer --with-undefined-behavior-sanitizer

./python -VV:

Python 3.14.8+ (heads/3.14:6490ca6f033, Oct  7 2026, 14:42:11) [Clang 23.1.1 ]

From a SQLAlchemy checkout, I ran:

uv sync --all-extras --all-groups --all-packages --python /home/boss/projects/oss/cpython/3.14/python

During setuptools.build_meta.build_editable, UBSan reported misaligned accesses in Python/jit.c. ASan then reported a SEGV on a read in _TAIL_CALL_JUMP_BACKWARD_JIT, and the process aborted.

Expected: CPython does not abort during the build.

Full log
❯ uv sync --all-extras --all-groups --all-packages --python ~/projects/oss/cpython/3.14/python
Using CPython 3.14.8+debug interpreter at: /home/boss/projects/oss/cpython/3.14/python
Creating virtual environment at: .venv
 × Failed to build `sqlalchemy @ file:///home/boss/projects/oss/sqlalchemy/main`
 ├─▶ The build backend returned an error
 ╰─▶ Call to `setuptools.build_meta.build_editable` failed (exit status: 1)

     [stderr]
     Python/jit.c:220:5: runtime error: store to misaligned address 0x7fa620900013 for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment
     0x7fa620900013: note: pointer points here
      49  89 d6 e8 00 00 00 00 5b  41 5c 41 5d 41 5e 41 5f  c3 00 00 00 00 00 00 00  00 00 00 00 00 00 00
                   ^
     SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Python/jit.c:220:5
     Python/jit.c:228:5: runtime error: store to misaligned address 0x7fa62090546e for type 'uint64_t' (aka 'unsigned long'), which requires 8 byte alignment
     0x7fa62090546e: note: pointer points here
      00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00
                  ^
     SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Python/jit.c:228:5
     Python/jit.c:332:24: runtime error: load of misaligned address 0x7fa62090546e for type 'uint64_t' (aka 'unsigned long'), which requires 8 byte alignment
     0x7fa62090546e: note: pointer points here
      00 00 00 00 30 61  03 21 a6 7f 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00
                  ^
     SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Python/jit.c:332:24
     AddressSanitizer:DEADLYSIGNAL
     =================================================================
     ==220585==ERROR: AddressSanitizer: SEGV on unknown address 0x7fa621223ff8 (pc 0x563291ec261a bp 0x7ffee9d31100 sp 0x7ffee9d31060 T0)
     ==220585==The signal is caused by a READ memory access.
         #0 0x563291ec261a in _TAIL_CALL_JUMP_BACKWARD_JIT /home/boss/projects/oss/cpython/3.14/Python/generated_cases.c.h:7844:25
         #1 0x563291e16a8c in _PyEval_EvalFrameDefault /home/boss/projects/oss/cpython/3.14/Python/ceval.c:1253:16
         #2 0x563291e1546b in _PyEval_Vector /home/boss/projects/oss/cpython/3.14/Python/ceval.c:2113:12
         #3 0x563291e1546b in PyEval_EvalCode /home/boss/projects/oss/cpython/3.14/Python/ceval.c:984:21
         #4 0x563291e07b33 in builtin_exec_impl /home/boss/projects/oss/cpython/3.14/Python/bltinmodule.c:1183:17
         #5 0x563291e07b33 in builtin_exec /home/boss/projects/oss/cpython/3.14/Python/clinic/bltinmodule.c.h:573:20
         #6 0x563291adde76 in cfunction_vectorcall_FASTCALL_KEYWORDS /home/boss/projects/oss/cpython/3.14/Objects/methodobject.c:465:24
         #7 0x56329194bb88 in _PyVectorcall_Call /home/boss/projects/oss/cpython/3.14/Objects/call.c:273:16
         #8 0x563291e30733 in _TAIL_CALL_CALL_FUNCTION_EX /home/boss/projects/oss/cpython/3.14/Python/generated_cases.c.h:2656:32
         #9 0x563291e16a8c in _PyEval_EvalFrameDefault /home/boss/projects/oss/cpython/3.14/Python/ceval.c:1253:16
         #10 0x563291e15996 in _PyEval_Vector /home/boss/projects/oss/cpython/3.14/Python/ceval.c:2113:12
         #11 0x563291950922 in _PyObject_VectorcallTstate /home/boss/projects/oss/cpython/3.14/./Include/internal/pycore_call.h:177:11
         #12 0x563291950922 in object_vacall /home/boss/projects/oss/cpython/3.14/Objects/call.c:820:14
         #13 0x5632919503db in PyObject_CallMethodObjArgs /home/boss/projects/oss/cpython/3.14/Objects/call.c:957:24
         #14 0x56329203c7f0 in import_find_and_load /home/boss/projects/oss/cpython/3.14/Python/import.c:3788:11
         #15 0x56329203b4bc in PyImport_ImportModuleLevelObject /home/boss/projects/oss/cpython/3.14/Python/import.c:3894:15
         #16 0x563291e245cb in _PyEval_ImportName /home/boss/projects/oss/cpython/3.14/Python/ceval.c:3142:16
         #17 0x563291e6285b in _TAIL_CALL_IMPORT_NAME /home/boss/projects/oss/cpython/3.14/Python/generated_cases.c.h:6347:31
         #18 0x563291e16a8c in _PyEval_EvalFrameDefault /home/boss/projects/oss/cpython/3.14/Python/ceval.c:1253:16
         #19 0x563291e1546b in _PyEval_Vector /home/boss/projects/oss/cpython/3.14/Python/ceval.c:2113:12
         #20 0x563291e1546b in PyEval_EvalCode /home/boss/projects/oss/cpython/3.14/Python/ceval.c:984:21
         #21 0x563291e07b33 in builtin_exec_impl /home/boss/projects/oss/cpython/3.14/Python/bltinmodule.c:1183:17
         #22 0x563291e07b33 in builtin_exec /home/boss/projects/oss/cpython/3.14/Python/clinic/bltinmodule.c.h:573:20
         #23 0x563291adde76 in cfunction_vectorcall_FASTCALL_KEYWORDS /home/boss/projects/oss/cpython/3.14/Objects/methodobject.c:465:24
         #24 0x56329194bb88 in _PyVectorcall_Call /home/boss/projects/oss/cpython/3.14/Objects/call.c:273:16
         #25 0x563291e30733 in _TAIL_CALL_CALL_FUNCTION_EX /home/boss/projects/oss/cpython/3.14/Python/generated_cases.c.h:2656:32
         #26 0x563291e16a8c in _PyEval_EvalFrameDefault /home/boss/projects/oss/cpython/3.14/Python/ceval.c:1253:16
         #27 0x563291e15996 in _PyEval_Vector /home/boss/projects/oss/cpython/3.14/Python/ceval.c:2113:12
         #28 0x563291950922 in _PyObject_VectorcallTstate /home/boss/projects/oss/cpython/3.14/./Include/internal/pycore_call.h:177:11
         #29 0x563291950922 in object_vacall /home/boss/projects/oss/cpython/3.14/Objects/call.c:820:14
         #30 0x5632919503db in PyObject_CallMethodObjArgs /home/boss/projects/oss/cpython/3.14/Objects/call.c:957:24
         #31 0x56329203c7f0 in import_find_and_load /home/boss/projects/oss/cpython/3.14/Python/import.c:3788:11
         #32 0x56329203b4bc in PyImport_ImportModuleLevelObject /home/boss/projects/oss/cpython/3.14/Python/import.c:3894:15
         #33 0x563291e245cb in _PyEval_ImportName /home/boss/projects/oss/cpython/3.14/Python/ceval.c:3142:16
         #34 0x563291e6285b in _TAIL_CALL_IMPORT_NAME /home/boss/projects/oss/cpython/3.14/Python/generated_cases.c.h:6347:31
         #35 0x563291e16a8c in _PyEval_EvalFrameDefault /home/boss/projects/oss/cpython/3.14/Python/ceval.c:1253:16
         #36 0x563291e1546b in _PyEval_Vector /home/boss/projects/oss/cpython/3.14/Python/ceval.c:2113:12
         #37 0x563291e1546b in PyEval_EvalCode /home/boss/projects/oss/cpython/3.14/Python/ceval.c:984:21
         #38 0x563291e07b33 in builtin_exec_impl /home/boss/projects/oss/cpython/3.14/Python/bltinmodule.c:1183:17
         #39 0x563291e07b33 in builtin_exec /home/boss/projects/oss/cpython/3.14/Python/clinic/bltinmodule.c.h:573:20
         #40 0x563291adde76 in cfunction_vectorcall_FASTCALL_KEYWORDS /home/boss/projects/oss/cpython/3.14/Objects/methodobject.c:465:24
         #41 0x56329194bb88 in _PyVectorcall_Call /home/boss/projects/oss/cpython/3.14/Objects/call.c:273:16
         #42 0x563291e30733 in _TAIL_CALL_CALL_FUNCTION_EX /home/boss/projects/oss/cpython/3.14/Python/generated_cases.c.h:2656:32
         #43 0x563291e16a8c in _PyEval_EvalFrameDefault /home/boss/projects/oss/cpython/3.14/Python/ceval.c:1253:16
         #44 0x563291e15996 in _PyEval_Vector /home/boss/projects/oss/cpython/3.14/Python/ceval.c:2113:12
         #45 0x563291950922 in _PyObject_VectorcallTstate /home/boss/projects/oss/cpython/3.14/./Include/internal/pycore_call.h:177:11
         #46 0x563291950922 in object_vacall /home/boss/projects/oss/cpython/3.14/Objects/call.c:820:14
         #47 0x5632919503db in PyObject_CallMethodObjArgs /home/boss/projects/oss/cpython/3.14/Objects/call.c:957:24
         #48 0x56329203c7f0 in import_find_and_load /home/boss/projects/oss/cpython/3.14/Python/import.c:3788:11
         #49 0x56329203b4bc in PyImport_ImportModuleLevelObject /home/boss/projects/oss/cpython/3.14/Python/import.c:3894:15
         #50 0x563291e245cb in _PyEval_ImportName /home/boss/projects/oss/cpython/3.14/Python/ceval.c:3142:16
         #51 0x563291e6285b in _TAIL_CALL_IMPORT_NAME /home/boss/projects/oss/cpython/3.14/Python/generated_cases.c.h:6347:31
         #52 0x563291e16a8c in _PyEval_EvalFrameDefault /home/boss/projects/oss/cpython/3.14/Python/ceval.c:1253:16
         #53 0x563291e1546b in _PyEval_Vector /home/boss/projects/oss/cpython/3.14/Python/ceval.c:2113:12
         #54 0x563291e1546b in PyEval_EvalCode /home/boss/projects/oss/cpython/3.14/Python/ceval.c:984:21
         #55 0x563292267cd3 in run_eval_code_obj /home/boss/projects/oss/cpython/3.14/Python/pythonrun.c:1396:12
         #56 0x56329226750c in run_mod /home/boss/projects/oss/cpython/3.14/Python/pythonrun.c:1490:19
         #57 0x563292262591 in _PyRun_String /home/boss/projects/oss/cpython/3.14/Python/pythonrun.c:1285:15
         #58 0x563291e075fb in builtin_exec_impl /home/boss/projects/oss/cpython/3.14/Python/bltinmodule.c
         #59 0x563291e075fb in builtin_exec /home/boss/projects/oss/cpython/3.14/Python/clinic/bltinmodule.c.h:573:20
         #60 0x563291adde76 in cfunction_vectorcall_FASTCALL_KEYWORDS /home/boss/projects/oss/cpython/3.14/Objects/methodobject.c:465:24
         #61 0x563291948d05 in _PyObject_VectorcallTstate /home/boss/projects/oss/cpython/3.14/./Include/internal/pycore_call.h:177:11
         #62 0x563291e5212a in _TAIL_CALL_CALL /home/boss/projects/oss/cpython/3.14/Python/generated_cases.c.h:1621:35
         #63 0x563291e16a8c in _PyEval_EvalFrameDefault /home/boss/projects/oss/cpython/3.14/Python/ceval.c:1253:16
         #64 0x563291e1546b in _PyEval_Vector /home/boss/projects/oss/cpython/3.14/Python/ceval.c:2113:12
         #65 0x563291e1546b in PyEval_EvalCode /home/boss/projects/oss/cpython/3.14/Python/ceval.c:984:21
         #66 0x563292267cd3 in run_eval_code_obj /home/boss/projects/oss/cpython/3.14/Python/pythonrun.c:1396:12
         #67 0x56329226750c in run_mod /home/boss/projects/oss/cpython/3.14/Python/pythonrun.c:1490:19
         #68 0x563292262591 in _PyRun_String /home/boss/projects/oss/cpython/3.14/Python/pythonrun.c:1285:15
         #69 0x563292262436 in _PyRun_SimpleString /home/boss/projects/oss/cpython/3.14/Python/pythonrun.c:588:21
         #70 0x56329231789d in pymain_run_command /home/boss/projects/oss/cpython/3.14/Modules/main.c:274:18
         #71 0x56329231789d in pymain_run_python /home/boss/projects/oss/cpython/3.14/Modules/main.c:743:21
         #72 0x56329231789d in Py_RunMain /home/boss/projects/oss/cpython/3.14/Modules/main.c:839:5
         #73 0x563292318c81 in pymain_main /home/boss/projects/oss/cpython/3.14/Modules/main.c:869:12
         #74 0x563292318f1c in Py_BytesMain /home/boss/projects/oss/cpython/3.14/Modules/main.c:893:12
         #75 0x7fa621027780  (/usr/lib/libc.so.6+0x27780) (BuildId: d320029ad1a23be2f4bce117fd321cbd23a2014b)
         #76 0x7fa6210278b8 in __libc_start_main (/usr/lib/libc.so.6+0x278b8) (BuildId: d320029ad1a23be2f4bce117fd321cbd23a2014b)
         #77 0x563291498ee4 in _start (/home/boss/projects/oss/cpython/3.14/python+0xcf0ee4) (BuildId: e4f55bbb414c660d12bdd18da58f84948160a926)

     ==220585==Register values:
     rax = 0x00000ac65257cb59  rbx = 0x00007ffee9d31060  rcx = 0x0000000000000000  rdx = 0x00000f7543eba000
     rdi = 0x00007fa6213603f8  rsi = 0x0000563292be5858  rbp = 0x00007ffee9d31100  rsp = 0x00007ffee9d31060
      r8 = 0x00007fa621186dc0   r9 = 0x00000000000000f5  r10 = 0x0000000000000001  r11 = 0x00007d262041c4a0
     r12 = 0x00007d76202119a8  r13 = 0x00007d262041c4a0  r14 = 0x0000563292c19b90  r15 = 0x00007fa621224000
     AddressSanitizer can not provide additional info.
     SUMMARY: AddressSanitizer: SEGV /home/boss/projects/oss/cpython/3.14/Python/generated_cases.c.h:7844:25 in _TAIL_CALL_JUMP_BACKWARD_JIT
     ==220585==ABORTING

     hint: This usually indicates a problem with the package or the build environment.

CPython versions tested on:

3.14

Operating systems tested on:

Linux

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL