Author christian.heimes
Recipients christian.heimes, martin.panter, ncoghlan, python-dev, vstinner
Date 2016-09-14.07:41:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473838865.7.0.913496881423.issue27778@psf.upfronthosting.co.za>
In-reply-to
Content
Oh sorry, I looked in the wrong location and missed it.

* if (PyErr_CheckSignals() < 0) {return NULL;} does not free buffer with PyMem_Free(buffer);

* The function allocates memory once with PyMem_Malloc() and later a second time with PyBytes_FromStringAndSize(buffer, n). You can avoid the first allocation and a memcpy() with PyBytes_FromStringAndSize(NULL, n) and PyBytes_AS_STRING().

* The syscall can also raise EPERM as reported by a user on QNAP. IIRC a seccomp policy caused EPERM.
History
Date User Action Args
2016-09-14 07:41:05christian.heimessetrecipients: + christian.heimes, ncoghlan, vstinner, python-dev, martin.panter
2016-09-14 07:41:05christian.heimessetmessageid: <1473838865.7.0.913496881423.issue27778@psf.upfronthosting.co.za>
2016-09-14 07:41:05christian.heimeslinkissue27778 messages
2016-09-14 07:41:05christian.heimescreate