[issue12834] memorview.to_bytes() and PyBuffer_ToContiguous() incorrect for non-contiguous arrays

Nick Coghlan report at bugs.python.org
Sun Jul 29 06:17:21 CEST 2012


Nick Coghlan added the comment:

Was the point that memoryview.tobytes() has a known data corruption bug in 3.2 and 2.7 raised in the previous discussion? I'm pretty sure I had forgotten about it, and I don't remember it coming up in the thread.

The trickiest aspect of a backport of the new implementation is that we need to preserve the C ABI - extensions compiled against any maintenance release should work with all maintenance releases in that series.

The new APIs aren't a major problem - just sprinkle a few underscores around to mark them as private on the older versions (I've certainly done that before when a bug fix genuinely needed something that qualified as a new feature: implemented a private version to use in fixing the bug on the maintenance branch, then promote that to a public API on trunk)

----------
priority: normal -> high
title: PyBuffer_ToContiguous() incorrect for non-contiguous arrays -> memorview.to_bytes() and PyBuffer_ToContiguous() incorrect for non-contiguous arrays

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12834>
_______________________________________


More information about the Python-bugs-list mailing list