[issue29817] File IO r+ read, write, read causes garbage data write.

2017-03-15 Thread Paul Moore
Changes by Paul Moore : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue29817] File IO r+ read, write, read causes garbage data write.

2017-03-15 Thread Paul Moore
Paul Moore added the comment: Also, this is a Python 2 only issue. The problem doesn't happen in Python 3.6 (at least in my quick experiment). I'm not 100% sure if this is because the internal implementation of IO changed in 3.x, or if it's just because we're now using a newer CRT which has fi

[issue29817] File IO r+ read, write, read causes garbage data write.

2017-03-15 Thread Eryk Sun
Eryk Sun added the comment: This is a bug in the C runtime's handling of "r+" mode with buffering. The CRT FILE stream's internal _cnt field, from the POV of the write() call, is the number of bytes that can be written to the internal buffer before it's full. The default buffer size is 4096 b

[issue29817] File IO r+ read, write, read causes garbage data write.

2017-03-15 Thread Jan
Changes by Jan : -- title: File IO read, write, read causes garbage data write. -> File IO r+ read, write, read causes garbage data write. ___ Python tracker ___ ___