Skip to content

Comments

gh-135573: Add a check for 0 items to APPENDS and ADDITEMS opcodes#135574

Closed
Legoclones wants to merge 2 commits intopython:mainfrom
Legoclones:pickle-appends-additems-no-items
Closed

gh-135573: Add a check for 0 items to APPENDS and ADDITEMS opcodes#135574
Legoclones wants to merge 2 commits intopython:mainfrom
Legoclones:pickle-appends-additems-no-items

Conversation

@Legoclones
Copy link
Contributor

@Legoclones Legoclones commented Jun 16, 2025

To align the C and Python implementations of pickle, a check for 0 items is added to the pickle module for APPENDS and ADDITEMS opcodes.

@serhiy-storchaka
Copy link
Member

This can only happen when the list is modified during pickling, in which case you may have a larger issue. The additional check has a cost which will never pay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants