Skip to content

Conversation

@zooba
Copy link
Member

@zoobazooba commented Aug 15, 2023

serhiy-storchakaand others added 2 commits August 15, 2023 17:23
* Strings with length from 2**31-1 to 2**32-2 always caused MemoryError, it doesn't matter how much memory is available. * Strings with length exactly 2**32-1 caused OSError. * Strings longer than 2**32-1 characters were truncated due to integer overflow bug. * Strings containing the null character were truncated at the first null character. Now strings longer than 2**31-1 characters caused OverflowError and the null character is allowed.
@zooba
Copy link
MemberAuthor

This relies on the fix in #107874 so I picked it into this PR. If the other PR is merged before then it should just disappear.

I also pre-backported #107983 to avoid a couple of compiler warnings.

@Yhg1s If you're okay with this (and #107874), would be good to have this 3.11 regression fixed in all 3.12 releases. It will get fixed in 3.11, but probably not the end of the world if it lands in 3.12.1.

@ambv
Copy link
Contributor

ambv commented Aug 15, 2023

Up to Thomas what to do with 3.12, I approved the 3.11 change.

@Yhg1s
Copy link
Member

#107874 was merged, so this needs double-checking that it's not unnecessarily (now) duplicating things. It's fine to get this into 3.12.

@zooba
Copy link
MemberAuthor

After the merge it's back down to the original change, so looks good to go

@Yhg1sYhg1s merged commit ede9895 into python:3.12Aug 16, 2023
@zoobazooba deleted the gh-106242-3.12 branch August 17, 2023 15:48
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@zooba@ambv@Yhg1s@bedevere-bot@finnagin@serhiy-storchaka