[Python-bugs-list] [Bug #111860] file.writelines() crashes

noreply@sourceforge.net noreply@sourceforge.net
Fri, 25 Aug 2000 09:24:17 -0700


Bug #111860, was updated on 2000-Aug-14 05:51
Here is a current snapshot of the bug.

Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 7
Summary: file.writelines() crashes

Details: writelines() method causes GPF when sequence with arbitrary objects passed as argument. Unicode character are written to file as '\0'.

Python 1.6b1, NT4.0

Follow-Ups:

Date: 2000-Aug-25 08:44
By: jhylton

Comment:
>>> f = open('/dev/null', 'w')
>>> l = ['1', 2]
>>> class Foo:
...     pass
... 
>>> l.append(Foo())
>>> 
>>> l
['1', 2, <__main__.Foo instance at 0x831fe2c>]
>>> f.writelines(l)
Segmentation fault (core dumped)

-------------------------------------------------------

Date: 2000-Aug-25 09:24
By: jhylton

Comment:
Patch #101299 fixes the core dump for non-string objects.

Not sure what the Unicode problem is, so assigning to MAL.

-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111860&group_id=5470