diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2017-08-05 22:36:10 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2017-08-05 22:38:48 +0300 |
commit | 31ed845b7057b6f07450f15eaa877d5a1ae12ce1 (patch) | |
tree | f41feafab55173892a97bdbe8af1b489bbe02864 /nix | |
parent | 9833bcfc08ef009b9e8b4398baa481ef65c80ad7 (diff) | |
download | patches-31ed845b7057b6f07450f15eaa877d5a1ae12ce1.tar patches-31ed845b7057b6f07450f15eaa877d5a1ae12ce1.tar.gz |
daemon: On aarch64, use increments of 16 on the stack.
* nix/libstore/build.cc (DerivationGoal::startBuilder): When on aarch64,
when calling clone(), increment the stack by 16.
Diffstat (limited to 'nix')
-rw-r--r-- | nix/libstore/build.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc index c6615865be..693fa70c8d 100644 --- a/nix/libstore/build.cc +++ b/nix/libstore/build.cc @@ -2008,7 +2008,11 @@ void DerivationGoal::startBuilder() char stack[32 * 1024]; int flags = CLONE_NEWPID | CLONE_NEWNS | CLONE_NEWIPC | CLONE_NEWUTS | SIGCHLD; if (!fixedOutput) flags |= CLONE_NEWNET; - pid = clone(childEntry, stack + sizeof(stack) - 8, flags, this); +#ifdef __aarch64__ + pid = clone(childEntry, stack + sizeof(stack) - 16, flags, this); +#else + pid = clone(childEntry, stack + sizeof(stack) - 8, flags, this); +#endif if (pid == -1) throw SysError("cloning builder process"); } else |