Assertion failures from `_interpchannels._register_end_types`
Open
Nobody has claimed this yet.
3.13
3.14
extension-modules
topic-subinterpreters
type-crash
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Crash report
What happened?
It's possible to abort a debug build by calling _interpchannels._register_end_types with invalid values:
import _interpchannels
_interpchannels._register_end_types(int, int)
Abort on 3.13:
python: Python/crossinterp_data_lookup.h:260: _PyCrossInterpreterData_RegisterClass: Assertion `matched->getdata == getdata' failed.
Aborted
Abort on main:
python: Python/crossinterp_data_lookup.h:271: _PyXIData_RegisterClass: Assertion `matched->getdata == getdata' failed.
Aborted
Found using fusil by @vstinner.
CPython versions tested on:
3.13, 3.14, CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.13.0+ (heads/3.13:746a0c5, Nov 20 2024, 21:39:05) [GCC 13.2.0]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the debug-build abort with the _interpchannels._register_end_types call shown in the report, then inspect that entry point and the related assertion in Python/crossinterp_data_lookup.h. Done means invalid values no longer abort the interpreter and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100