This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2009年12月08日 02:59 by vstinner, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| cpickle_load_pop-3.patch | vstinner, 2009年12月11日 11:40 | |||
| issue7455_cpickle_load_pop.diff | flox, 2009年12月19日 00:12 | Patch, apply to trunk | ||
| issue7455_cpickle_load_pop_py3k.diff | flox, 2009年12月19日 00:13 | Patch, apply to py3k | ||
| Messages (9) | |||
|---|---|---|---|
| msg96106 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2009年12月08日 02:59 | |
load_pop() pops a value if the stack length is >= 0. The test is wrong:
if the length is zero, the stack is empty and stackUnderflow() have to
be called.
Example:
$ ../../python -c "import cPickle; cPickle.loads('0')"
Erreur de segmentation
|
|||
| msg96107 - (view) | Author: Eric V. Smith (eric.smith) * (Python committer) | Date: 2009年12月08日 06:20 | |
Can you add a test for this? |
|||
| msg96121 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2009年12月08日 10:48 | |
> Can you add a test for this? I wasn't sure of the right place to add the test. I tried Lib/test/pickletester.py, but it doesn't work because UnpicklingError is not defined there. Well, here is a new version of my patch with an unit test. |
|||
| msg96245 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2009年12月11日 11:40 | |
Oops, cpickle_load_pop-2.patch contains an useless variable (picklingError = pickle.UnpicklingError). Here is the version 3 of my patch. |
|||
| msg96273 - (view) | Author: Jack Diederich (jackdied) * (Python committer) | Date: 2009年12月11日 21:01 | |
This seems to have been introduced in r72930 when the stackUnderflow() was moved from the top of the function to the bottom. It used to test for len > 0. Question, should cPickle and pickle be raising the same error here? UnpicklingError is defined in pickle.py and never used but cPickle.c uses it frequently. |
|||
| msg96585 - (view) | Author: Florent Xicluna (flox) * (Python committer) | Date: 2009年12月18日 21:29 | |
The patch works correctly on 2.7. It should be applied on trunk, and backported to other branches, too. (issue7542 is marked as duplicate of this one) |
|||
| msg96593 - (view) | Author: Florent Xicluna (flox) * (Python committer) | Date: 2009年12月19日 00:12 | |
I moved the test to test.pickletester, so that it can be used for all 3 tests: test_pickle test_cpickle test_xpickle (and backported a test which was only on py3k) |
|||
| msg97361 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2010年01月07日 18:05 | |
Committed in all four branches. Thank you Victor and Florent! |
|||
| msg97495 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2010年01月10日 03:04 | |
> Committed in all four branches. trunk: r77352 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:55 | admin | set | github: 51704 |
| 2010年01月22日 19:54:08 | eric.smith | link | issue7758 superseder |
| 2010年01月10日 03:04:15 | vstinner | set | messages: + msg97495 |
| 2010年01月07日 18:05:01 | pitrou | set | status: open -> closed nosy: + pitrou messages: + msg97361 resolution: fixed stage: patch review -> resolved |
| 2010年01月07日 17:27:30 | flox | set | files: - issue7455_silence_py3k_warning.diff |
| 2009年12月21日 22:24:24 | flox | set | priority: normal stage: test needed -> patch review |
| 2009年12月19日 00:13:42 | flox | set | files: + issue7455_silence_py3k_warning.diff |
| 2009年12月19日 00:13:10 | flox | set | files: - issue7455_silence_py3k_warning.diff |
| 2009年12月19日 00:13:02 | flox | set | files: + issue7455_cpickle_load_pop_py3k.diff |
| 2009年12月19日 00:12:37 | flox | set | files:
+ issue7455_cpickle_load_pop.diff messages: + msg96593 |
| 2009年12月18日 21:48:31 | flox | set | files: + issue7455_silence_py3k_warning.diff |
| 2009年12月18日 21:29:53 | flox | set | type: crash |
| 2009年12月18日 21:29:36 | flox | set | nosy:
+ flox messages: + msg96585 versions: + Python 2.6, Python 3.1, Python 3.2 |
| 2009年12月11日 21:01:22 | jackdied | set | nosy:
+ jackdied, collinwinter messages: + msg96273 |
| 2009年12月11日 13:10:15 | pitrou | set | nosy:
+ alexandre.vassalotti |
| 2009年12月11日 11:40:42 | vstinner | set | files:
+ cpickle_load_pop-3.patch messages: + msg96245 |
| 2009年12月11日 11:39:53 | vstinner | set | files: - cpickle_load_pop-2.patch |
| 2009年12月11日 11:39:47 | vstinner | set | files: - cpickle_load_pop.patch |
| 2009年12月08日 10:49:00 | vstinner | set | files:
+ cpickle_load_pop-2.patch messages: + msg96121 |
| 2009年12月08日 06:20:13 | eric.smith | set | nosy:
+ eric.smith messages: + msg96107 stage: test needed |
| 2009年12月08日 02:59:17 | vstinner | create | |