Author vstinner
Recipients vstinner
Date 2009-06-12.10:50:27
SpamBayes Score 6.65246e-07
Marked as misclassified No
Message-id <>
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, you can see the warning using strace:

$ strace -e close python 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.
Date User Action Args
2009-06-12 10:50:30vstinnersetrecipients: + vstinner
2009-06-12 10:50:30vstinnersetmessageid: <>
2009-06-12 10:50:28vstinnerlinkissue6271 messages
2009-06-12 10:50:28vstinnercreate