diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch new file mode 100644 index 0000000..f0154eb --- /dev/null +++ b/011-no-faulthandler.patch @@ -0,0 +1,53 @@ +diff --git pypy3-v5.5.0-src/lib-python/3/test/regrtest.py pypy3-v5.5.0-src/lib-python/3/test/regrtest.py-new +index 8d18a9297a..e99322ebe1 100755 +--- pypy3-v5.5.0-src/lib-python/3/test/regrtest.py ++++ pypy3-v5.5.0-src/lib-python/3/test/regrtest.py-new +@@ -169,7 +169,6 @@ option '-uall,-gui'. + import importlib + + import builtins +-import faulthandler + import getopt + import io + import json +@@ -197,6 +196,10 @@ try: + import multiprocessing.process + except ImportError: + multiprocessing = None ++try: ++ import faulthandler ++except ImportError: ++ faulthandler = None + + + # Some times __path__ and __file__ are not absolute (e.g. while running from +@@ -283,17 +286,18 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, + on the command line. + """ + +- # Display the Python traceback on fatal errors (e.g. segfault) +- faulthandler.enable(all_threads=True) +- +- # Display the Python traceback on SIGALRM or SIGUSR1 signal +- signals = [] +- if hasattr(signal, 'SIGALRM'): +- signals.append(signal.SIGALRM) +- if hasattr(signal, 'SIGUSR1'): +- signals.append(signal.SIGUSR1) +- for signum in signals: +- faulthandler.register(signum, chain=True) ++ if faulthandler: ++ # Display the Python traceback on fatal errors (e.g. segfault) ++ faulthandler.enable(all_threads=True) ++ ++ # Display the Python traceback on SIGALRM or SIGUSR1 signal ++ signals = [] ++ if hasattr(signal, 'SIGALRM'): ++ signals.append(signal.SIGALRM) ++ if hasattr(signal, 'SIGUSR1'): ++ signals.append(signal.SIGUSR1) ++ for signum in signals: ++ faulthandler.register(signum, chain=True) + + replace_stdout() + diff --git a/pypy3.spec b/pypy3.spec index ea45edf..d826142 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -170,6 +170,9 @@ Patch4: 009-raise-an-error-when-STARTTLS-fails.patch # Disabled HTTP header injections in http.client Patch5: 010-disabled-HTTP-header-injections-in-http.client.patch +# It seems ppc64 has no faulthandler +Patch6: 011-no-faulthandler.patch + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so