This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients BreamoreBoy, damiro, pitrou, steve.dower, tim.golden, tim.peters, vstinner, zach.ware
Date 2015-04-12.01:28:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1428802108.04.0.640309901233.issue19050@psf.upfronthosting.co.za>
In-reply-to
Content
Still an issue in 2.7.10rc0+.  Here's a couple different reproducers that come closer to the heart of the matter:

"""
>>> import os
[43913 refs]
>>> os.close(1)
[43913 refs]
>>> input()
1
[43915 refs]
<crash>
"""

"""
>>> import os
[43913 refs]
>>> f = file('test', 'wb')
[43921 refs]
>>> os.close(f.fileno())
[43921 refs]
>>> f.flush()
[43921 refs]
>>> f.write('test')
[43921 refs]
>>> f.flush()
<crash>
"""

The problem appears to be calling fflush on a pointer to a closed file.  In the first reproducer, this happens in myreadline.c, the second in fileobject.c.

I was interested enough to track it down; I'm not motivated enough to fix it since it appears to be broken only in 2.7.
History
Date User Action Args
2015-04-12 01:28:28zach.waresetrecipients: + zach.ware, tim.peters, pitrou, vstinner, tim.golden, damiro, BreamoreBoy, steve.dower
2015-04-12 01:28:28zach.waresetmessageid: <1428802108.04.0.640309901233.issue19050@psf.upfronthosting.co.za>
2015-04-12 01:28:28zach.warelinkissue19050 messages
2015-04-12 01:28:27zach.warecreate