New submission from STINNER Victor <victor.stin...@haypocalc.com>: Hi, Valgrind just told me that Python calls close(-1) on my_mmap_object.close() for memory mappings. That's because a memory mapping has no (related) file descriptor.
Using attached warn.py, you can see the warning using strace: $ strace -e close python warn.py 2>&1|grep -A1 12345 close(12345) = -1 EBADF (Bad file descriptor) close(4294967295) = -1 EBADF (Bad file descriptor) close(12345) = -1 EBADF (Bad file descriptor) where close(4294967295) means close(-1). Attached patch fixes this warning. ---------- components: Extension Modules files: warn.py messages: 89269 nosy: haypo severity: normal status: open title: mmap: don't close file description if fd=-1 versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file14268/warn.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6271> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com