Fix segfault on hostpython2 when compiling for x86_64 #1351
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a fixes for #1297 - on some platform, Python < 2.7.15 crashes due to a bug highlighted only with recent compilers.
This one liner came from python/cpython@e348c8d#diff-fb41bdaf12f733cf6ab8a82677d03adc that contains a extensive explaination about it. It could be done on Python 2 for ARM, but the bug isn't triggered at the moment.
I compiled a fresh app with this patch, it doesn't segfault during the compilation of hostpython2, and the app on Android runs.
(I talked about moving to Python 2.7.15, but it would take more time that just accepting this patch, as we would need to update hostpython2 and python2 recipes, and all cross compilation patches. Plus more testing as ssl module changed somewhere, unsure if we don't need more patching to make it work.)
Closes #1297