Author Vladimir.Ushakov
Recipients Vladimir.Ushakov
Date 2012-10-12.14:04:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za>
In-reply-to
Content
The following code crashes the interpreter on Linux:

#!/usr/bin/python3

import mmap

with open('test', 'wb') as f:
    f.write(bytes(1))

with open('test', 'r+b') as f:
    m = mmap.mmap(f.fileno(), 0)
    f.truncate()
    a = m[:]

---

It's not specific to the zero size truncation, it's enough if the file size decreases beyond a page border.
History
Date User Action Args
2012-10-12 14:04:24Vladimir.Ushakovsetrecipients: + Vladimir.Ushakov
2012-10-12 14:04:23Vladimir.Ushakovsetmessageid: <1350050663.98.0.0365442687476.issue16212@psf.upfronthosting.co.za>
2012-10-12 14:04:23Vladimir.Ushakovlinkissue16212 messages
2012-10-12 14:04:23Vladimir.Ushakovcreate