python / python/cpython

`str.replace` can crash under memory pressure

Open
#152,228 0 comments 0 reactions 1 assignee View on GitHub

@sobolevn is already working on this.

Since Jun 25, 2026.

interpreter-core topic-unicode type-crash
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Crash report

Refs https://github.com/python/cpython/issues/151763

Original description: https://gist.github.com/devdanzin/34b633230f6d2301ba17dec195ffe4b7 as OOM-009

Linked PRs
  • gh-152229
  • gh-152615
  • gh-152616
  • gh-152617

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.