From 1bb6c8a88112c4ecf2bb109262dc1ed7a568556f Mon Sep 17 00:00:00 2001 From: Nicolas OTTON Date: Wed, 22 Sep 2021 14:06:54 +0200 Subject: [PATCH] patch python 3.6.5 for FD34 --- applications/MEDCOUPLING-master-MPI.pyconf | 4 +++ .../patches/python_3.6.5-allocation.patch | 26 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 products/patches/python_3.6.5-allocation.patch diff --git a/applications/MEDCOUPLING-master-MPI.pyconf b/applications/MEDCOUPLING-master-MPI.pyconf index 61f251e..33a3f2a 100644 --- a/applications/MEDCOUPLING-master-MPI.pyconf +++ b/applications/MEDCOUPLING-master-MPI.pyconf @@ -90,4 +90,8 @@ __overwrite__ : __condition__ : "VARS.dist in ['FD32']" 'APPLICATION.products.scipy' : '1.5.2' # gcc https://github.com/scipy/scipy/issues/11611 - either patch numpy to include -fallow-argument-mismatch or move to that version } + { + __condition__: "VARS.dist in ['FD34']" + 'PRODUCTS.Python.version_3_6_5.patches' : ["python_3.6.5-allocation.patch"] # https://github.com/pyenv/pyenv/issues/1889 + } ] diff --git a/products/patches/python_3.6.5-allocation.patch b/products/patches/python_3.6.5-allocation.patch new file mode 100644 index 0000000..0002c5c --- /dev/null +++ b/products/patches/python_3.6.5-allocation.patch @@ -0,0 +1,26 @@ +diff -Naur Python_old/Include/objimpl.h Python/Include/objimpl.h +--- Python_old/Include/objimpl.h 2021-09-22 13:45:20.116037197 +0200 ++++ Python/Include/objimpl.h 2021-09-22 13:46:05.444683399 +0200 +@@ -255,7 +255,7 @@ + union _gc_head *gc_prev; + Py_ssize_t gc_refs; + } gc; +- double dummy; /* force worst-case alignment */ ++ long double dummy; /* force worst-case alignment */ + } PyGC_Head; + + extern PyGC_Head *_PyGC_generation0; +diff -Naur Python_old/Objects/obmalloc.c Python/Objects/obmalloc.c +--- Python_old/Objects/obmalloc.c 2018-03-28 11:19:31.000000000 +0200 ++++ Python/Objects/obmalloc.c 2021-09-22 13:46:32.901074624 +0200 +@@ -633,8 +633,8 @@ + * + * You shouldn't change this unless you know what you are doing. + */ +-#define ALIGNMENT 8 /* must be 2^N */ +-#define ALIGNMENT_SHIFT 3 ++#define ALIGNMENT 16 /* must be 2^N */ ++#define ALIGNMENT_SHIFT 4 + + /* Return the number of bytes in size class I, as a uint. */ + #define INDEX2SIZE(I) (((uint)(I) + 1) << ALIGNMENT_SHIFT) -- 2.39.2