[issue12847] crash with negative PUT in pickle

2011-08-29 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___ P

[issue12847] crash with negative PUT in pickle

2011-08-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0d9e4ce1c010 by Antoine Pitrou in branch '3.2': Issue #12847: Fix a crash with negative PUT and LONG_BINPUT arguments in http://hg.python.org/cpython/rev/0d9e4ce1c010 New changeset fb8d7a666bed by Antoine Pitrou in branch 'default': Issue #12847: F

[issue12847] crash with negative PUT in pickle

2011-08-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Same with LONG_BINPUT on a 32-bit build: >>> s = b'\x80\x03X\x01\x00\x00\x00ar\xff\xff\xff\xff.' >>> pickletools.dis(s) 0: \x80 PROTO 3 2: XBINUNICODE 'a' 8: rLONG_BINPUT -1 13: .STOP highest protocol among opcodes = 2 >>> pickle

[issue12847] crash with negative PUT in pickle

2011-08-27 Thread Antoine Pitrou
New submission from Antoine Pitrou : This doesn't happen on 2.x cPickle, where PUT keys are simply treated as strings. >>> import pickle, pickletools >>> s = b'Va\np-1\n.' >>> pickletools.dis(s) 0: VUNICODE'a' 3: pPUT-1 7: .STOP highest protocol among opcodes