Message95965
I think this is an implementation issue in MemoryView rather than an
issue with the buffer interface. PEP 3118 states, "This same bufferinfo
structure must be passed to bf_releasebuffer (if available) when the
consumer is done with the memory." -- this is not guaranteed by the
current MemoryView implementation.
The calls are not paired: the *_getbuf calls fill in structures with
data "view1", and "view2". The *_releasebuf calls receive structures
with data "view1", and "view1". The data filled in the second getbuf
call ("view2") is never passed back to *_releasebuf, as it is
overwritten with "view1" data by dup_buffer.
To work around this, *_releasebuf must be written so that it does not
use the "view" pointer passed to it -- the data structure may have been
shallow copied and any memory pointers in it may have already been freed.
I can try to cook up a patch fixing this. |
|
Date |
User |
Action |
Args |
2009-12-04 14:24:52 | pv | set | recipients:
+ pv, pitrou |
2009-12-04 14:24:51 | pv | set | messageid: <1259936691.96.0.0163827438802.issue7433@psf.upfronthosting.co.za> |
2009-12-04 14:24:50 | pv | link | issue7433 messages |
2009-12-04 14:24:50 | pv | create | |
|