Skip to content

Crash in Objects/unicodeobject.c::_copy_characters when there is nothing to copy (DEBUG build only) #127903

Description

@shadchin

Crash report

What happened?

Reproduce on Python 3.12.8+ or 3.13.1+, main work fine, but there is a problem there too:

./configure --with-pydebug
make
./python --version
Python 3.13.1+
./python -c 'import datetime as dt; dt.datetime(2013, 11, 10, 14, 20, 59).strftime("%z")'
Segmentation fault

No need to check to if we don't write there

Fix in #127876

CPython versions tested on:

3.12, 3.13

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

Python 3.13.1+ (heads/3.13:d51c1444e3, Dec 12 2024, 19:36:26) [GCC 9.4.0]

Linked PRs

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

    3.12only security fixes3.13only security fixes3.14bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions