Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segfault on hostpython2 when compiling for x86_64 #1351

Merged
merged 1 commit into from
Sep 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;