This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alexandre.vassalotti
Recipients alexandre.vassalotti
Date 2010-09-28.00:07:43
SpamBayes Score 0.000537445
Marked as misclassified No
Message-id <>
This was mentioned during the review of issue #9410
(, however we forgot to fix this.

The new array-based memo for the Unpickler class assumes incorrectly that memo indices are always contiguous. This is not the case. And due to this, the following pickle will cause Unpickler to use about 3GB of memory to store the memo array.

./python -c "import pickle; pickle.loads(b'\x80\x02]r\xff\xff\xff\x06.')"

To fix this, we can add code to fall-back to a dictionary-based memo when the memo keys are not contiguous.
Date User Action Args
2010-09-28 00:07:48alexandre.vassalottisetrecipients: + alexandre.vassalotti
2010-09-28 00:07:48alexandre.vassalottisetmessageid: <>
2010-09-28 00:07:45alexandre.vassalottilinkissue9965 messages
2010-09-28 00:07:43alexandre.vassalotticreate