Message117492
This was mentioned during the review of issue #9410
(http://codereview.appspot.com/1694050/diff/2001/3001#newcode347), 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:48 | alexandre.vassalotti | set | recipients:
+ alexandre.vassalotti |
2010-09-28 00:07:48 | alexandre.vassalotti | set | messageid: <1285632468.19.0.235987005106.issue9965@psf.upfronthosting.co.za> |
2010-09-28 00:07:45 | alexandre.vassalotti | link | issue9965 messages |
2010-09-28 00:07:43 | alexandre.vassalotti | create | |
|