[pypy-commit] pypy py3k: PyByteArray_Resize does not zero the memory when upsizing
rlamy
pypy.commits at gmail.com
Thu Oct 6 11:58:42 EDT 2016
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3k
Changeset: r87615:fddfc58cb1a7
Date: 2016-10-06 16:57 +0100
http://bitbucket.org/pypy/pypy/changeset/fddfc58cb1a7/
Log: PyByteArray_Resize does not zero the memory when upsizing
diff --git a/pypy/module/cpyext/test/test_bytearrayobject.py b/pypy/module/cpyext/test/test_bytearrayobject.py
--- a/pypy/module/cpyext/test/test_bytearrayobject.py
+++ b/pypy/module/cpyext/test/test_bytearrayobject.py
@@ -179,7 +179,7 @@
)])
ret = module.bytearray_resize(b'abc', 6)
assert len(ret) == 6,"%s, len=%d" % (ret, len(ret))
- assert ret == b'abc\x00\x00\x00'
+ assert ret[:4] == b'abc\x00'
ret = module.bytearray_resize(b'abcdefghi', 4)
assert len(ret) == 4,"%s, len=%d" % (ret, len(ret))
assert ret == b'abcd'
More information about the pypy-commit
mailing list