gh-152228: Fix an assertion failure in str.replace under a limited memory case#152229
Conversation
Co-authored-by: Stan Ulbrych <stan@python.org>
|
Created #152236 to track |
| @@ -0,0 +1 @@ | |||
| Fix a crash in :meth:`str.replace` under a limited memory situation. | |||
There was a problem hiding this comment.
I wouldn't call it a "crash". It's "only" an assertion failure when Python is built in debug mode.
str.replace under a limited memory casestr.replace under a limited memory case
|
Strange, CI tests pass, but test_str fails when I download the PR locally: Do it work on your machine? The "Squash and merge" should work around the issue anyway. |
|
Looks like a forgot to push the merge commit. Did it now :) |
But it's strange that tests passed on the CI (without the merge commit). |
|
Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
|
GH-152615 is a backport of this pull request to the 3.15 branch. |
|
GH-152616 is a backport of this pull request to the 3.14 branch. |
|
GH-152617 is a backport of this pull request to the 3.13 branch. |

Because test was simple enough and was always
0as the memory limit, I decided to include it.str.replacecan crash under memory pressure #152228