[New-bugs-announce] [issue22668] memoryview.format is corrupted due to dangling shared pointer

Tom Flanagan report at bugs.python.org
Sun Oct 19 00:13:53 CEST 2014


New submission from Tom Flanagan:

When slicing or cloning a memoryview object that has been previously cast to change its format string, the new memoryview's format shares a pointer to the parent's format string, which may be deleted at any time.

This manifests as a corrupt format when using the new memoryview object, causing crashes or unexpected behavior.

Tested on:
Python 3.4.0 (default, Apr 11 2014, 13:05:11) [GCC 4.8.2] on linux
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 bit (AMD64)] on win32
Python 3.5.0a0 (default:cb8606fc84df, Oct 18 2014, 14:55:44) [GCC 4.8.2] on linux

----------
components: Interpreter Core
files: memoryview_bug.py
messages: 229664
nosy: Knio, pitrou, skrah
priority: normal
severity: normal
status: open
title: memoryview.format is corrupted due to dangling shared pointer
type: crash
versions: Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file36965/memoryview_bug.py

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


More information about the New-bugs-announce mailing list