[Patches] [ python-Patches-505705 ] Remove eval in pickle and cPickle

noreply@sourceforge.net noreply@sourceforge.net
Sun, 11 Aug 2002 13:47:00 -0700


Patches item #505705, was opened at 2002-01-19 10:21
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=505705&group_id=5470

Category: Core (C code)
Group: None
Status: Open
Resolution: Out of Date
Priority: 5
Submitted By: Martin v. Löwis (loewis)
Assigned to: Martin v. Löwis (loewis)
Summary: Remove eval in pickle and cPickle

Initial Comment:
This patch removes the use of eval in pickle and cPickle.

It does so by:
- moving the actual parsing from compile.c:parsestr to
PyString_DecodeEscape
- introducing a new codec string-escape
- removing the code that checks that a
string-to-unpickle is properly escaped throughout, and
replaces this with a check whether it is properly quoted,
- unquoting the string in load_string, then passing it
to the codec.

This fixes #502503.

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2002-08-11 22:47

Message:
Logged In: YES 
user_id=21627

Updated to current CVS.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-08-11 16:09

Message:
Logged In: YES 
user_id=6380

This would fix bug #593656 too.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-08-09 16:48

Message:
Logged In: YES 
user_id=6380

I like this idea. But the patch is out of date. Can you
rework the patch? How much faster does this make the test
program from

http://groups.google.de/groups?hl=en&lr=&ie=UTF-8&selm=mailman.1026940226.16076.python-list%40python.org

???

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-08-09 06:12

Message:
Logged In: YES 
user_id=6380

I'll review this.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-01-19 10:25

Message:
Logged In: YES 
user_id=21627

BTW, this patch has #500002 as a prerequisite.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=505705&group_id=5470