[Python-checkins] cpython: Issue 16398: One more assertion for good measure.

raymond.hettinger python-checkins at python.org
Sat Feb 2 21:27:03 CET 2013


http://hg.python.org/cpython/rev/12ef5a4bba63
changeset: 81948:12ef5a4bba63
parent: 81946:8b8c6abda7e8
user: Raymond Hettinger <python at rcn.com>
date: Sat Feb 02 12:26:37 2013 -0800
summary:
 Issue 16398: One more assertion for good measure.
files:
 Modules/_collectionsmodule.c | 2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -484,6 +484,8 @@
 if (m > BLOCKLEN - 1 - deque->rightindex)
 m = BLOCKLEN - 1 - deque->rightindex;
 assert (m > 0);
+ assert (deque->leftblock != deque->rightblock ||
+ deque->leftindex + m < deque->rightindex + 1);
 memcpy(&deque->rightblock->data[deque->rightindex + 1],
 &deque->leftblock->data[deque->leftindex],
 m * sizeof(PyObject *));
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /