Skip to content

Commit

Permalink
fix segfault on hostpython when compiling for x86_64. CF python/cpython@
Browse files Browse the repository at this point in the history
  • Loading branch information
tito committed Sep 4, 2018
1 parent 2b3d52b commit ee427a3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions pythonforandroid/recipes/hostpython2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Hostpython2Recipe(Recipe):
version = '2.7.2'
url = 'https://python.org/ftp/python/{version}/Python-{version}.tar.bz2'
name = 'hostpython2'
patches = ['fix-segfault-pygchead.patch']

conflicts = ['hostpython3']

Expand Down
12 changes: 12 additions & 0 deletions pythonforandroid/recipes/hostpython2/fix-segfault-pygchead.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -Naur Python-2.7.2.orig/Include/objimpl.h Python-2.7.2/Include/objimpl.h
--- Python-2.7.2.orig/Include/objimpl.h 2011-06-11 17:46:23.000000000 +0200
+++ Python-2.7.2/Include/objimpl.h 2018-09-04 17:33:09.254654565 +0200
@@ -255,7 +255,7 @@
union _gc_head *gc_prev;
Py_ssize_t gc_refs;
} gc;
- long double dummy; /* force worst-case alignment */
+ double dummy; /* force worst-case alignment */
} PyGC_Head;

extern PyGC_Head *_PyGC_generation0;

0 comments on commit ee427a3

Please sign in to comment.