Skip to content

Commit

Permalink
openblas: apply patch to prevent SIGILL on aarch64
Browse files Browse the repository at this point in the history
The applied patch contains the changes from this PR:
OpenMathLib/OpenBLAS#3060

This patch prevents gcc from reordering instructions in a way
that can cause crashes with SIGILL on aarch64.

This issue crashes python when importing numpy on aarch64:
numpy/numpy#18131
  • Loading branch information
mschwaig authored and github-actions[bot] committed Mar 20, 2021
1 parent b9bb86d commit 7669751
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkgs/development/libraries/science/math/openblas/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, perl, which
{ lib, stdenv, fetchFromGitHub, fetchpatch, perl, which
# Most packages depending on openblas expect integer width to match
# pointer width, but some expect to use 32-bit integers always
# (for compatibility with reference BLAS).
Expand Down Expand Up @@ -116,6 +116,15 @@ stdenv.mkDerivation rec {
sha256 = "14jxh0v3jfbw4mfjx4mcz4dd51lyq7pqvh9k8dg94539ypzjr2lj";
};

# remove this when updating from 0.3.13
patches = [
(fetchpatch {
name = "label-get_cpu_ftr-as-volatile.patch";
url = "https://github.com/xianyi/OpenBLAS/pull/3060.patch";
sha256 = "06gwh73k4sas1ap2fi3jvpifbjkys2vhmnbj4mzrsvj279ljsfdk";
})
];

inherit blas64;

# Some hardening features are disabled due to sporadic failures in
Expand Down

0 comments on commit 7669751

Please sign in to comment.