summaryrefslogtreecommitdiff
path: root/Python/marshal.c
AgeCommit message (Collapse)AuthorLines
2009-10-31Set retval on PyOS_string_to_double failure.Mark Dickinson-3/+9
2009-10-27Removed PyOS_ascii_atof from marshal.c, as mentioned in issue 7117. Also ↵Eric Smith-11/+9
brings it more in line with py3k.
2009-10-19Removed calls to PyFloat_AsReprString.Eric Smith-42/+63
This is in anticipation of possibly implementing issue 7117 (short float repr). This removes the last calls to PyFloat_AsString, PyFloat_AsReprString, and PyFloat_AsStringEx, which are unsafe. Also, switch to defines for error values to bring this code more in line with the py3k branch.
2009-09-29Issue #7019: Unmarshalling of bad long data could produce unnormalizedMark Dickinson-3/+13
PyLongs. Raise ValueError instead.
2009-05-13Move news item to correct section, remove spurious 'see below'R. David Murray-1/+1
from docstring.
2009-05-13Issue 5994: add docstrings to marshal.R. David Murray-5/+81
2009-03-20Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.Mark Dickinson-39/+105
Backport of r70459.
2009-03-15Make marshalling errors a little more informative as to what went wrongNick Coghlan-13/+13
2008-06-16Issue 3116: fix quadratic behavior in marshal.dumps().Raymond Hettinger-1/+1
2008-06-09This reverts r63675 based on the discussion in this thread:Gregory P. Smith-18/+18
http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
2008-05-26Renamed PyString to PyBytesChristian Heimes-18/+18
2008-05-11#1792: Improve performance of marshal.dumps() on large objects by increasingAndrew M. Kuchling-1/+4
the size of the buffer more quickly.
2008-02-01Fix refleakNeal Norwitz-0/+1
2008-01-30Removed unused varChristian Heimes-1/+1
2008-01-28Removed unnecessary conditional (spotted by Neal Norwitz).Raymond Hettinger-1/+1
2008-01-28Let marshal built-up sets and frozensets one element at a time (without ↵Raymond Hettinger-12/+8
creating an intermediate tuple).
2008-01-26Revert PySet_Add() changes.Raymond Hettinger-8/+12
2008-01-26Let marshal build-up sets and frozensets one element at a time.Raymond Hettinger-12/+8
Saves the unnecessary creation of a tuple as intermediate container.
2007-11-07Fix marshal's incorrect handling of subclasses of builtin types (backport ↵Raymond Hettinger-10/+10
candidate).
2007-10-12Fix Coverity 185-186: If the passed in FILE is NULL, uninitialized memoryNeal Norwitz-0/+2
would be accessed. Will backport.
2007-05-17Last try for tweaking the max stack depth. 5000 was the original value,Neal Norwitz-1/+1
4000 didn't work either. 1000 does work on Windows. If 2000 works, that will hopefully be a reasonable balance.
2007-05-17Set the depth to something very small to try to determine if theNeal Norwitz-1/+1
crashes on Windows are really due to the stack size or possibly some other problem.
2007-05-17Reduce the max stack depth to see if this fixes the segfaults onNeal Norwitz-1/+1
Windows and some other boxes. If this is successful, this rev should be backported. I'm not sure how close to the limit we should push this.
2007-05-16Fix bug in marshal where bad data would cause a segfault due toNeal Norwitz-69/+156
lack of an infinite recursion check. Contributed by Damien Miller at Google.
2006-10-04Forward-port of r52136,52138: a review of overflow-detecting code.Armin Rigo-13/+25
* unified the way intobject, longobject and mystrtoul handle values around -sys.maxint-1. * in general, trying to entierely avoid overflows in any computation involving signed ints or longs is extremely involved. Fixed a few simple cases where a compiler might be too clever (but that's all guesswork). * more overflow checks against bad data in marshal.c. * 2.5 specific: fixed a number of places that were still confusing int and Py_ssize_t. Some of them could potentially have caused "real-world" breakage. * list.pop(x): fixing overflow issues on x was messy. I just reverted to PyArg_ParseTuple("n"), which does the right thing. (An obscure test was trying to give a Decimal to list.pop()... doesn't make sense any more IMHO) * trying to write a few tests...
2006-08-12This code is actually not used unless WITHOUT_COMPLEX is defined.Neal Norwitz-0/+8
However, there was no error checking that PyFloat_FromDouble returned a valid pointer. I believe this change is correct as it seemed to follow other code in the area. Klocwork # 292.
2006-05-29Convert more modules to METH_VARARGS.Georg Brandl-5/+3
2006-03-07Change int to Py_ssize_t in several places.Martin v. Löwis-10/+26
Add (int) casts to silence compiler warnings. Raise Python exceptions for overflows.
2006-03-01Make Py_ssize_t clean.Thomas Wouters-1/+3
2006-03-01Fix incompatible assignment warning from previous checkin.Thomas Wouters-1/+2
2006-03-01Fix gcc (4.0.x) warning about use of uninitialized variables.Thomas Wouters-1/+2
(PyMarshal_ReadShortFromFile() is only used in zipimport.c, I don't believe the extra initializations will matter one way or another.)
2006-02-16Move cast to suppress warning.Martin v. Löwis-2/+2
2006-02-15Merge ssize_t branch.Martin v. Löwis-11/+15
2006-01-19Check return result from Py_InitModule*(). This API can fail.Neal Norwitz-0/+2
Probably should be backported.
2005-11-16version was not initialized properlyNeal Norwitz-0/+1
2005-10-21Fix a bunch of imports to use code.h instead of compile.h.Jeremy Hylton-1/+0
Remove duplicate declarations from compile.h
2005-10-20Merge ast-branch to headJeremy Hylton-0/+1
This change implements a new bytecode compiler, based on a transformation of the parse tree to an abstract syntax defined in Parser/Python.asdl. The compiler implementation is not complete, but it is in stable enough shape to run the entire test suite excepting two disabled tests.
2005-08-16Add a C API for sets and frozensets.Raymond Hettinger-4/+2
2005-06-25Fix signedness of various char variables to stop causing a warning under gcc 4.Brett Cannon-10/+10
2005-06-13Fix bugMichael W. Hudson-0/+4
[ 1180997 ] lax error-checking in new-in-2.4 marshal stuff which I'd assigned to Martin, but actually turned out to be easy to fix. Also, a test.
2005-06-13Remove extraneous format character from PyArg_ParseTuple call inMichael W. Hudson-1/+1
marshal_loads. Bugfix candidate.
2005-06-03Fix a couple of crashing-on-malformed data marshal bugs.Michael W. Hudson-6/+8
2005-06-03This is my patch:Michael W. Hudson-64/+174
[ 1180995 ] binary formats for marshalling floats Adds 2 new type codes for marshal (binary floats and binary complexes), a new marshal version (2), updates MAGIC and fiddles the de-serializing of code objects to be less likely to clobber the real reason for failing if it fails.
2005-01-12remove unused variableFred Drake-1/+0
2005-01-11SF 1098985: set objects cannot be marshalledRaymond Hettinger-1/+66
2004-12-20Any call to marshal.dumps() with the new optional argument 'version' justArmin Rigo-1/+1
immediately segfaults, due to a typo! This was obviously never tested... Added a test for it, and also fixed the documentation.
2004-06-27Patch #923098: Share interned strings in marshal.Martin v. Löwis-15/+74
2004-06-13Make private function staticNeal Norwitz-1/+1
2004-06-08Patch #774665: Make Python LC_NUMERIC agnostic.Martin v. Löwis-3/+3
2004-03-26Marshal clean-up (SF patch #873224)Armin Rigo-63/+54