diff --git a/pkgs/applications/science/math/gap/default.nix b/pkgs/applications/science/math/gap/default.nix index 04a49becc97..ce93c14b334 100644 --- a/pkgs/applications/science/math/gap/default.nix +++ b/pkgs/applications/science/math/gap/default.nix @@ -101,6 +101,9 @@ stdenv.mkDerivation rec { excludes = ["tst/testinstall/stringobj.tst"]; sha256 = "1mz5b4mbw2jdd1ypp5s0dy6pp0jsvwsxr2dm4kbkls20r1r192sc"; }) + + # fixes aarch64 gc crashes: https://github.com/gap-system/gap/pull/3965 + ./mark-genstackfuncbags-as-noinline.patch ]; postPatch = '' diff --git a/pkgs/applications/science/math/gap/mark-genstackfuncbags-as-noinline.patch b/pkgs/applications/science/math/gap/mark-genstackfuncbags-as-noinline.patch new file mode 100644 index 00000000000..3a2f7231c09 --- /dev/null +++ b/pkgs/applications/science/math/gap/mark-genstackfuncbags-as-noinline.patch @@ -0,0 +1,13 @@ +diff --git a/src/gasman.c b/src/gasman.c +index 417811401..314a74190 100644 +--- a/src/gasman.c ++++ b/src/gasman.c +@@ -1861,7 +1861,7 @@ void SparcStackFuncBags( void ) + #endif + + +-void GenStackFuncBags ( void ) ++NOINLINE void GenStackFuncBags ( void ) + { + Bag * top; /* top of stack */ + Bag * p; /* loop variable */