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 hfuru
Recipients hfuru
Date 2010-11-04.11:43:43
SpamBayes Score 1.4719014e-07
Marked as misclassified No
Message-id <1288871027.11.0.979430970782.issue10309@psf.upfronthosting.co.za>
In-reply-to
Content
dlmalloc uses mremap() which is undeclared on Linux, needs _GNU_SOURCE.
This can break at least on hosts where void* = 64 bits and int (default
return type) 32 bits, since some bits in the return type are lost.

A minimal patch is:

--- Modules/_ctypes/libffi/src/dlmalloc.c
+++ Modules/_ctypes/libffi/src/dlmalloc.c
@@ -459,2 +459,4 @@
 #define MMAP_CLEARS 0 /* WINCE and some others apparently don't clear */
+#elif !defined _GNU_SOURCE
+#define _GNU_SOURCE 1           /* mremap() in Linux sys/mman.h */
 #endif  /* WIN32 */

However the (char*)CALL_MREMAP() cast looks like a broken fix for this,
it suppresses a warning instead of fixing it.  Maybe you should remove
the cast and instead assign CALL_MREMAP() to a void*, to catch any
similar trouble in the future.
History
Date User Action Args
2010-11-04 11:43:47hfurusetrecipients: + hfuru
2010-11-04 11:43:47hfurusetmessageid: <1288871027.11.0.979430970782.issue10309@psf.upfronthosting.co.za>
2010-11-04 11:43:44hfurulinkissue10309 messages
2010-11-04 11:43:43hfurucreate