[issue9543] 2.6.6 rc1 socket.py flush() calls del on unbound 'view' variable
Barry A. Warsaw ba...@python.org added the comment: Patch accepted, please apply for 2.6.6. -- resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9543 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9543] 2.6.6 rc1 socket.py flush() calls del on unbound 'view' variable
Ezio Melotti ezio.melo...@gmail.com added the comment: Done in r83964. -- resolution: accepted - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9543 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9543] 2.6.6 rc1 socket.py flush() calls del on unbound 'view' variable
Ezio Melotti ezio.melo...@gmail.com added the comment: Here is the patch. -- keywords: +needs review, patch stage: unit test needed - patch review Added file: http://bugs.python.org/file18474/issue9543.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9543 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9543] 2.6.6 rc1 socket.py flush() calls del on unbound 'view' variable
Ezio Melotti ezio.melo...@gmail.com added the comment: Thanks for the report and for figuring out what was the cause! Indeed the view added after the del shouldn't be there, so I will remove it. It would also be great if you could provide a minimal script to reproduce the problem so that it can be turned to a test. None of the tests in the current test suite seem to go through that code path, so the error passed unnoticed. -- assignee: - ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9543 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9543] 2.6.6 rc1 socket.py flush() calls del on unbound 'view' variable
Martin gzl...@googlemail.com added the comment: spiv wrote a script to repo the issue in the downstream ubuntu bug: https://bugs.launchpad.net/python/+bug/615240 -- nosy: +gz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9543 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9543] 2.6.6 rc1 socket.py flush() calls del on unbound 'view' variable
Andrew Bennetts s...@users.sourceforge.net added the comment: I have a reproduction script on the Ubuntu bug report I just filed for this issue: https://bugs.launchpad.net/ubuntu/+source/python2.6/+bug/615240 Pasting here for convenience: import socket import threading sock_a, sock_b = socket.socketpair() sock_a = socket.socket(_sock=sock_a) def read_byte_then_close(s): data = s.recv(1) s.close() t = threading.Thread(target=read_byte_then_close, args=(sock_b,)) t.start() file_a = sock_a.makefile('w') file_a.writelines(['a'*8192]*1000) file_a.flush() t.join() It's not quite good enough to add to the test suite yet IMO, but it's a starting point. -- nosy: +spiv ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9543 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9543] 2.6.6 rc1 socket.py flush() calls del on unbound 'view' variable
Andrew Bennetts s...@users.sourceforge.net added the comment: Chatting with Taggnostr on IRC I've trimmed that reproduction down to something much cleaner (no magic numbers or threads involved): import socket sock_a, sock_b = socket.socketpair() sock_a = socket.socket(_sock=sock_a) sock_b.close() file_a = sock_a.makefile('w') file_a.write('x') file_a.flush() -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9543 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9543] 2.6.6 rc1 socket.py flush() calls del on unbound 'view' variable
New submission from David I. Lehn d...@lehn.org: An error was introduced in 2.6.6 rc1 in the socket flush() call where del is called on the unbound 'view' variable. Associated commit and diff: http://svn.python.org/view?view=revrevision=83624 http://svn.python.org/view/python/tags/r266rc1/Lib/socket.py?r1=81488r2=83624 Tail end of the runtime stack trace: File /usr/lib/python2.6/socket.py, line 318, in write self.flush() File /usr/lib/python2.6/socket.py, line 302, in flush del view, data # explicit free UnboundLocalError: local variable 'view' referenced before assignment -- components: Library (Lib) messages: 113357 nosy: dil priority: normal severity: normal status: open title: 2.6.6 rc1 socket.py flush() calls del on unbound 'view' variable type: crash versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9543 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9543] 2.6.6 rc1 socket.py flush() calls del on unbound 'view' variable
R. David Murray rdmur...@bitdance.com added the comment: Thank you very much for testing the alpha and making a report. I've added Ezio to nosy since he backported the patch, and Barry since he's release manager. -- nosy: +barry, ezio.melotti, r.david.murray priority: normal - release blocker stage: - unit test needed type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9543 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com