Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2ebada4

Browse files
committed
- Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper
signature. Without this, architectures where sizeof void* != sizeof int are broken. Patch given by Hallvard B Furuseth.
2 parents 4c14bba + d460a76 commit 2ebada4

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

Misc/NEWS

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Core and Builtins
1616

1717
- Issue #10271: Allow warnings.showwarning() be any callable.
1818

19-
- Issue #11627: Fix segfault when __new__ on a exception returns a non-exception
20-
class.
19+
- Issue #11627: Fix segfault when __new__ on a exception returns a
20+
non-exception class.
2121

2222
- Issue #12149: Update the method cache after a type's dictionnary gets
2323
cleared by the garbage collector. This fixes a segfault when an instance
@@ -1040,6 +1040,10 @@ Tools/Demos
10401040
Extension Modules
10411041
-----------------
10421042

1043+
- Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper
1044+
signature. Without this, architectures where sizeof void* != sizeof int are
1045+
broken. Patch given by Hallvard B Furuseth.
1046+
10431047
- Issue #12221: Replace pyexpat.__version__ with the Python version.
10441048

10451049
- Issue #12051: Fix segfault in json.dumps() while encoding highly-nested

Modules/_ctypes/libffi/src/dlmalloc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,11 @@ DEFAULT_MMAP_THRESHOLD default: 256K
457457
#define LACKS_ERRNO_H
458458
#define MALLOC_FAILURE_ACTION
459459
#define MMAP_CLEARS 0 /* WINCE and some others apparently don't clear */
460+
#elif !defined _GNU_SOURCE
461+
/* mremap() on Linux requires this via sys/mman.h
462+
* See roundup issue 10309
463+
*/
464+
#define _GNU_SOURCE 1
460465
#endif /* WIN32 */
461466

462467
#if defined(DARWIN) || defined(_DARWIN)

0 commit comments

Comments
 (0)