[Python-3000] Py3k_struni additional test failures under cygwin (original) (raw)
Guido van Rossum guido at python.org
Mon Jul 30 02:09:37 CEST 2007
- Previous message: [Python-3000] Py3k_struni additional test failures under cygwin
- Next message: [Python-3000] Introspection broken for objects using Py_FindMethod()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 7/29/07, Joe Smith <unknown_kev_cat at hotmail.com> wrote:
What I have found is that (on CYGWIN) all of marshal seems to work fine except for marshal.load(). marshal.dump()'s output can be read by 2.5's marshal.load() without problem. 3k's marshal.load() will not load the data from 3k's marshal.dump or 2.5's marshal.dump()
It turns out to be a fault due to an uninitialized value on a RFILE. Specifically, the following patch (part of marshalload in marshal.c fixes things. -----BEGIN PATCH----- Index: Python/marshal.c =================================================================== --- Python/marshal.c (revision 56620) +++ Python/marshal.c (working copy) @@ -1181,6 +1181,7 @@ return NULL; } rf.strings = PyListNew(0); + rf.depth=0; result = readobject(&rf); PyDECREF(rf.strings); PyDECREF(data); -----END PATCH----- I'll submit the patch to sourceforge if needed, although the fact that all the other loading methods do set rf.depth=0 (including PyMarshalReadObjectFromFile) indicates to me that this is definately the correct patch. Looks like that line was accidentally forgoten.
Thanks! Looks like that line was accidentally dropped -- perhaps as a result of a merge. It was in all previous versions.
Anyway, I've added it back.
Committed revision 56623.
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-3000] Py3k_struni additional test failures under cygwin
- Next message: [Python-3000] Introspection broken for objects using Py_FindMethod()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]