Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue15309] buffer/memoryview slice assignment uses only memcpy

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Jul 9, 2012, 2:21 PM

Post #1 of 4 (120 views)
Permalink
[issue15309] buffer/memoryview slice assignment uses only memcpy

New submission from Ronny Pfannschmidt <ronny.pfannschmidt [at] gmail>:

thats broken for assigning overlaping regions, the memcpy docs explicitly state that memmove should be used in overlap cases

----------
messages: 165127
nosy: Ronny.Pfannschmidt
priority: normal
severity: normal
status: open
title: buffer/memoryview slice assignment uses only memcpy
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15309>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jul 9, 2012, 5:10 PM

Post #2 of 4 (119 views)
Permalink
[issue15309] buffer/memoryview slice assignment uses only memcpy [In reply to]

Changes by Antoine Pitrou <pitrou [at] free>:


----------
nosy: +skrah

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15309>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jul 10, 2012, 2:17 AM

Post #3 of 4 (117 views)
Permalink
[issue15309] buffer/memoryview slice assignment uses only memcpy [In reply to]

Stefan Krah <stefan-usenet [at] bytereef> added the comment:

Could you please state the Python version and line numbers in
memoryobject.c?

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15309>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jul 10, 2012, 3:24 PM

Post #4 of 4 (118 views)
Permalink
[issue15309] buffer/memoryview slice assignment uses only memcpy [In reply to]

Stefan Krah <stefan-usenet [at] bytereef> added the comment:

I see nothing wrong in memory_ass_sub(). In 2.7:

if (destbuf + bytelen < srcbuf || srcbuf + bytelen < destbuf)
/* No overlapping */
memcpy(destbuf, srcbuf, bytelen);
else
memmove(destbuf, srcbuf, bytelen);


Other versions use similar idioms.

----------
resolution: -> invalid
stage: -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15309>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.